Page 15 of 36,922, showing 100 records out of 3,692,143 total, starting on record 1,401, ending on 1,500
# | Username | Text | |
---|---|---|---|
# | Aug 7th 2008, 00:32 | TonkaTruck | That was too big for hugeurl.com |
# | Aug 7th 2008, 00:32 | chrysanthemum | ..... what's wrong with java? |
# | Aug 7th 2008, 00:32 | batcoder-7 | its the heart of your computer chrysanthemum |
# | Aug 7th 2008, 00:33 | polerin | anyway |
# | Aug 7th 2008, 00:33 | polerin | I need to get back to work |
# | Aug 7th 2008, 00:33 | batcoder-7 | start with a nin dynamic langauge |
# | Aug 7th 2008, 00:33 | chrysanthemum | i know, i've been wanting to learn objective C |
# | Aug 7th 2008, 00:33 | batcoder-7 | non* |
# | Aug 7th 2008, 00:33 | polerin | Eddie_CRO: did you see what I meen about where to put the first snippit? |
# | Aug 7th 2008, 00:33 | chrysanthemum | becuase I want to do some stuff for my iPhone |
# | Aug 7th 2008, 00:33 | chrysanthemum | maybe someday |
# | Aug 7th 2008, 00:34 | chrysanthemum | I have fun with PHP, i feel like C would be a drudgery |
# | Aug 7th 2008, 00:34 | TonkaTruck | Eddie_CRO: I was a bit confused semantically on the use of the word contain. It's either "I contained my wide array" or "my array contains..." I prefer to think of it as the latter. |
# | Aug 7th 2008, 00:34 | batcoder-7 | objective C is just apples little modification to the language |
# | Aug 7th 2008, 00:34 | polerin | TonkaTruck: think of it more along the lines of "I want my results to contain this information" |
# | Aug 7th 2008, 00:34 | Eddie_CRO | polerin, Tonka: It seems interesting. So i have to nest contains. Does it work in ->find or i have to use model->Contain? |
# | Aug 7th 2008, 00:35 | TonkaTruck | polerin: Yes...but in the docs it seems more like "we're working hard to contain the fire on the third floor" |
# | Aug 7th 2008, 00:35 | polerin | it works in find, but if you're doing it that deep I would reccomend using model->contain or assigning it to a variable first |
# | Aug 7th 2008, 00:35 | polerin | that kind of array nesting makes reading function calls a PITA |
# | Aug 7th 2008, 00:35 | polerin | TonkaTruck: heheh |
# | Aug 7th 2008, 00:35 | TonkaTruck | Eddie_CRO: One of the things I tried before reading the contain test cases was nesting them, yes...heh. But no...think of it more like "beautify" |
# | Aug 7th 2008, 00:36 | polerin | contain was the first one of those things that really won me over |
# | Aug 7th 2008, 00:36 | TonkaTruck | So in the MVC world the C team is trying to give the V team something intuitive to work with. |
# | Aug 7th 2008, 00:36 | polerin | I used to use the old ModelWhatever->unbindAll(array('except for these')); |
# | Aug 7th 2008, 00:36 | polerin | and contain uses the best of that |
# | Aug 7th 2008, 00:36 | polerin | TonkaTruck: or reduce the load that M has to get back from the db |
# | Aug 7th 2008, 00:37 | TonkaTruck | I could be very wrong but I would say contain() is more like find() result beautification. |
# | Aug 7th 2008, 00:37 | polerin | (yay limiting fields to needed! ) |
# | Aug 7th 2008, 00:37 | TonkaTruck | recursive notwithstanding. |
# | Aug 7th 2008, 00:37 | polerin | no way, when you have 15 associations and they go deep, contains is WAY easier than going through and unbinding each of them |
# | Aug 7th 2008, 00:37 | TonkaTruck | polerin: Yeah good point I didn't even think of that. |
# | Aug 7th 2008, 00:37 | polerin | and really really saves processing |
# | Aug 7th 2008, 00:38 | polerin | because cake has to process each result array into the nested result |
# | Aug 7th 2008, 00:38 | polerin | s/result array/ resultant record/ |
# | Aug 7th 2008, 00:38 | TonkaTruck | polerin: did you notice in the contain test cases that they set recursive before contain() ? |
# | Aug 7th 2008, 00:38 | polerin | yes, because they are wanting to make sure contain is correctly fiddling with the recursive setting I think |
# | Aug 7th 2008, 00:39 | polerin | not 100% but that's my first instinct |
# | Aug 7th 2008, 00:39 | polerin | anyhow |
# | Aug 7th 2008, 00:39 | polerin | back to writing fixtures |
# | Aug 7th 2008, 00:39 | polerin | thankfully this I should only have one more after this one |
# | Aug 7th 2008, 00:39 | polerin | then I can actually start coding |
# | Aug 7th 2008, 00:39 | TonkaTruck | It's a bit counter-intuitive because contain() is either a) semantically inclusive and b) logically exclusive or vise versa. |
# | Aug 7th 2008, 00:40 | TonkaTruck | Somewhere there is a law professor who is very proud of me for articulating that. |
# | Aug 7th 2008, 00:41 | TonkaTruck | haha |
# | Aug 7th 2008, 00:41 | polerin | sorry, but lawereese slaughteres the language |
# | Aug 7th 2008, 00:41 | polerin | almost as badly as I do |
# | Aug 7th 2008, 00:41 | ChipotleCoyote | Sort of weird implementation question/problem. I have a project in mind that I'd like to allow people to upload text files to and have other people comment on by paragraph, sort of the way Microsoft Word allows comments on files. But I haven't thought of a good way to implement that kind of comment system. |
# | Aug 7th 2008, 00:43 | TonkaTruck | Eddie_CRO: To answer your last question I'm not sure it matter whether contain is defined via contain() or 'contain' as a key in your find(). |
# | Aug 7th 2008, 00:44 | TonkaTruck | Eddie_CRO: let me know if the cake-php group post made sense...and if that works. If so you should post a reply with your contain. I was surprised by how few people have noted complex contain examples on their blogs. When I say "complex" I just mean arrays wider than 2 deep I guess. |
# | Aug 7th 2008, 00:44 | polerin | ChipotleCoyote: TextFile hasMany Section hasMany Comment |
# | Aug 7th 2008, 00:45 | polerin | ChipotleCoyote: that way you could arbitraily bust up any single file into multiple sections and assign comments |
# | Aug 7th 2008, 00:46 | polerin | ChipotleCoyote: depending on how you decide to do it, you could actually just have "section" be a character range for the file, and whatever view you use uses those character range to bust it up |
# | Aug 7th 2008, 00:46 | Eddie_CRO | it is not working yet, i get some data just with group empty. |
# | Aug 7th 2008, 00:47 | Eddie_CRO | http://bin.cakephp.org/view/1158867500 |
# | Aug 7th 2008, 00:47 | polerin | Eddie_CRO: try doing the find from Item->User-> |
# | Aug 7th 2008, 00:47 | Eddie_CRO | it doesn't seem to do the trick |
# | Aug 7th 2008, 00:47 | polerin | and making it a first level contain, then work your way back |
# | Aug 7th 2008, 00:47 | ChipotleCoyote | polerin: Hmm. I'd thought of something like that, with 'section' just being paragraphs, but figured you could end up with an *awful* lot of paragraph records that way, particularly if you allow for each text file to go through revisions. :) But I guess that might not be a problem in practice. |
# | Aug 7th 2008, 00:48 | Eddie_CRO | polerin: can i use Item.field in conditions this way? |
# | Aug 7th 2008, 00:48 | polerin | Eddie_CRO: not sure, just see if you can get the group conditions working first |
# | Aug 7th 2008, 00:48 | polerin | sorry, but i'm dead tired and I'm going to need to minimize this window so I can concentrate |
# | Aug 7th 2008, 00:49 | polerin | too many things to do that aren't "manually create this join table fixture" |
# | Aug 7th 2008, 00:49 | polerin | P |
# | Aug 7th 2008, 00:50 | TonkaTruck | Eddie_CRO: Yeah basically just design the result you want from find()...the only rule seems to be that you cannot violate your relationships...which is obvious...but still is worth noting because it seems to be the only rule. |
# | Aug 7th 2008, 00:51 | ChipotleCoyote | ACTION should fall over. Too much alcohol to do real coding, or even coding planning. |
# | Aug 7th 2008, 00:51 | TonkaTruck | Eddie_CRO: http://bin.cakephp.org/view/319462953 also see this because it includes my find() |
# | Aug 7th 2008, 00:51 | Eddie_CRO | what do you mean design the result. |
# | Aug 7th 2008, 00:53 | TonkaTruck | Eddie_CRO: in that contain(), just think "what do I want from find?" That's how I got it to work. Skip Class.field for now because I'm not sure if that goes inside the parent model or parallel with it. |
# | Aug 7th 2008, 00:53 | polerin | it goes with the Class model |
# | Aug 7th 2008, 00:53 | TonkaTruck | Also note 'recursive' in the find() itself. |
# | Aug 7th 2008, 00:53 | polerin | which is usefull, because it meens that you can specify conditions for things that are on the other side of a multi-select find |
# | Aug 7th 2008, 00:54 | Eddie_CRO | Tonka: yes, but try to put in the last array a condition like FormPost.somefield = somevalue |
# | Aug 7th 2008, 00:55 | Eddie_CRO | and check if it gives you the Forum record back although it doesn't contain formpost's condition. |
# | Aug 7th 2008, 00:55 | Eddie_CRO | it seems it does. |
# | Aug 7th 2008, 00:55 | Eddie_CRO | just with empty FormPost array. |
# | Aug 7th 2008, 00:56 | TonkaTruck | I get an empty forumpost array if there are no forumposts for that topic. |
# | Aug 7th 2008, 00:57 | Eddie_CRO | yes but you get the record for Forum. |
# | Aug 7th 2008, 00:57 | Eddie_CRO | which is not what you want |
# | Aug 7th 2008, 00:57 | TonkaTruck | Yes. I'm assuming because I'm doing $this->Forum->find() |
# | Aug 7th 2008, 00:57 | Eddie_CRO | you don't want records for Forum if it doesn't have that specific ForumPost condition. |
# | Aug 7th 2008, 00:57 | Eddie_CRO | what else?! |
# | Aug 7th 2008, 00:57 | TonkaTruck | I want the forum record. |
# | Aug 7th 2008, 00:57 | Eddie_CRO | yes but with some forumpost conditions, right? |
# | Aug 7th 2008, 00:59 | poluta1 | hello anybody know how to make ajax observeField stay selected if a user submitting form, and user forget to fill valid email |
# | Aug 7th 2008, 01:00 | TonkaTruck | This is to view a list of topics in a forum. So I start at Forum and get the topics in that forum. For each topic I get the user who created the topic and a the last forumpost for that topic as well as the user who posted it. |
# | Aug 7th 2008, 01:01 | Eddie_CRO | yes, and try now limiting this with something from ForumPost. And doing so, you expect find not to return you records of Forum if FormPost criteria is not fulfilled. |
# | Aug 7th 2008, 01:01 | Eddie_CRO | right? |
# | Aug 7th 2008, 01:02 | Traveler6 | how do i check if the table is being updated or a new one added in the controller |
# | Aug 7th 2008, 01:02 | Traveler6 | basically i want to use beforeSave in the controller |
# | Aug 7th 2008, 01:03 | TonkaTruck | Eddie_CRO: That was a problem I encountered. I thought "I want a list of topics in a forum" so my find() should be Topic->find() but with contain and recursive I could see a nice way to get it. So I want backwards to the Forum model and contained down from there. |
# | Aug 7th 2008, 01:03 | polerin | btw, have I publicly stated my deep and abiding love for vim's "visual block" recently? |
# | Aug 7th 2008, 01:03 | polerin | becasue it is full of win and absolute awesome. |
# | Aug 7th 2008, 01:04 | Eddie_CRO | tonka: yes, but how to do that then? |
# | Aug 7th 2008, 01:04 | poluta1 | hello anybody know how to make ajax observeField stay selected if a user submitting form, and user forget to fill valid email |
# | Aug 7th 2008, 01:05 | polerin | Traveler6: ask the question more specifically, what problem are you having or are trying to solve? |
# | Aug 7th 2008, 01:05 | TonkaTruck | Eddie_CRO: I just noticed something. Where you have 'Category' => array() < that array should have 'conditions' => array('Group.name' => 'some_name') right? |
# | Aug 7th 2008, 01:06 | Eddie_CRO | hm |
# | Aug 7th 2008, 01:06 | Eddie_CRO | i didn't understand it that way. wait to try. |
# | Aug 7th 2008, 01:06 | TonkaTruck | Eddie_CRO: See the very end of this page: http://book.cakephp.org/view/474/containable |
# | Aug 7th 2008, 01:06 | Traveler6 | i want to perform some actions if the user is updating a row. but i want to be able to do it globally, and not have to put code in the admin_edit admin_add fields etc.. |