#silverstripe IRC Log

IRC log for 3 May 2015

All timestamps are in UTC.

1: [00:05:32] * UncleCheese has joined #silverstripe
2: [00:08:50] * joelpittet quit (Remote host closed the connection)
3: [00:44:06] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
4: [00:50:03] * joelpittet has joined #silverstripe
5: [01:06:39] * Err404NotFound has joined #silverstripe
6: [01:06:39] * Error404NotFound quit (Disconnected by services)
7: [01:12:11] <Motoservo> If I’m using $fields->addFieldToTab("Root.Thesaurus", new TextField('Term', 'Add Search Term')); on HomeworkPage but Term (referenced in the TextField object is a DataObject and not part of Sitetree, how would I get it to insert into the db? Seems I’m missing something in the connection here.
8: [01:14:22] <Motoservo> I tested and it works if I have Term in the page’s db but if I put that column in the dataobject instead I can’t seem to insert to it, though the name is the same.
9: [01:21:07] <Motoservo> Just trying to use this field to insert dataobjects (names) that I can view with GridField lower on the page.
10: [01:26:16] * UncleCheese has joined #silverstripe
11: [01:26:48] <Motoservo> Or, asked another way. If I want to use addFieldToTab and make a Textfield add records to a DataObject I have defined elsewhere, how would I go about that?
12: [02:26:03] <Motoservo> If using addFieldToTab how can I get TextField to add to a column of a dataobject instead of the page object where I’m using the addFieldToTab?
13: [02:27:01] <Motoservo> I mean, create a new record in that dataobject’s table (hope that makes sense).
14: [02:27:17] <Motoservo> Any takes?
15: [02:27:21] <Motoservo> Takers?
16: [02:29:36] <Motoservo> Or, if I’m going about this wrong, let me know. Just trying to add a new tab with a field I can use to start adding names (as objects) to a synonym dictionary I’m building.
17: [02:37:29] <UncleCheese> not sure i get it
18: [02:38:21] <UncleCheese> oh you're talking about like a $has_one relation on the page, Motoservo ?
19: [02:40:57] <Motoservo> Yes, it’s a has many. I have a Term object extending Dataobject. I’m trying to build a collection that I can manage in the CMS from the Homework Page.
20: [02:41:14] <Motoservo> HomeworkPage has many Terms
21: [02:42:09] <Motoservo> I’ve added the tab but I can only seem to get the addFieldToTab with a TextField to add to the HomeworkPage table. That’s not what I want.
22: [02:42:29] <Motoservo> Trying to get that field to add objects to the Term table.
23: [02:44:20] <Motoservo> As far as I know, UncleCheese, the name param in TextField is what column I’m going to hit in *that page* object, right? How can I get the TextField, instead, to add to the Term dataobject (and create a new record, in doing so.
24: [02:44:50] <UncleCheese> if it's a has_many, you want a gridfield
25: [02:46:59] <UncleCheese> http://www.silverstripe.org/learn/lessons/working-with-data-relationships-has-many
26: [02:49:49] <Motoservo> http://pastie.org/private/kguitytr3ibi49kavfg9g
27: [02:50:06] <Motoservo> I have one of those (as per our conversation earlier today) just below that.
28: [02:51:11] <Motoservo> But since I don’t have any data yet to see I was trying to add a field that would do that. I only spent about ten minutes looking and decided (for now, anyway) the answer was no. But does the Gridfield also facilitate adding the data, too?
29: [02:51:45] <Motoservo> If so, I need to be reading that more instead of figuring out the other way I’m trying.
30: [02:53:01] <Motoservo> This was the other file with that, UncleCheese. http://pastie.org/private/72fanwiskagl32ilbutg
31: [02:54:16] <UncleCheese> DataObject::get('Term') <-- Super old school, soon to be deprecated
32: [02:54:42] <UncleCheese> you haven't added any config to your GridField
33: [02:54:49] <UncleCheese> so it has no buttons or anything
34: [02:55:33] <UncleCheese> $fields->addFieldToTab("Root.Thesaurus", new GridField('Term', 'Terms', $this->Terms(), GridFieldConfig_RecordEditor::create()));
35: [02:56:02] <Motoservo> I realize it has a whole world onto it. Though I thought it might (at first) I had figured I should try and add the data via TextField (as per my previous questions). I’m guessing you’re saying that’s the wrong road and to reserach GridField more?
36: [02:56:27] <Motoservo> Okay, I’ll try that.
37: [02:56:31] <Motoservo> brb
38: [02:56:33] <UncleCheese> no, you're on the right track, you just didn't configure your grid
39: [02:57:09] <UncleCheese> it's a bit crap that you have to have a whole grid interface just to manage a single field.. there are some other ways you can do it if you want a better UX
40: [02:57:27] <Motoservo> Well, I was adding a TextField and a Gridfield. The first to add and the second to view.
41: [02:57:39] <UncleCheese> oh, no, no
42: [02:57:49] <UncleCheese> that's like.. never going to work
43: [02:57:50] <UncleCheese> ha
44: [02:57:58] <Motoservo> :P
45: [02:59:14] <Motoservo> Where I’m trying to end up… I have an teacher who I’m building a new site for. He needs a list of terms with a has many with themselves (as synonyms).
46: [03:01:26] <Motoservo> So, though there will be thousands, as a test case I want to build, say, ten or twenty terms that appear on the left with radios and on the right with checkboxes. Then, when one radio on the left is clicked, an arbitrary number of the ones on the right can be assigned via checkboxes.
47: [03:02:13] <Motoservo> two of the same list. Say, 20 words on the left with radios and the same 20 on the right with checkboxes.
48: [03:02:54] <Motoservo> Each on the left assignable to an arbitrary number on the right. Hope that makes sense, UncleCheese. Is Gridfield a good choice?
49: [03:03:17] <UncleCheese> no, that's really custom
50: [03:03:32] <UncleCheese> you can do it with gridfield
51: [03:03:37] <UncleCheese> but you're not going to get that UI
52: [03:03:55] <UncleCheese> the radio button UI you're talking about would essentially be replaced with clicking an item in the grid
53: [03:03:59] <Motoservo> Which approach would you take? Something other than Gridfield?
54: [03:04:06] <UncleCheese> and the detail view would be the checkboxes
55: [03:04:22] <Motoservo> That would be fine, too.
56: [03:04:45] <Motoservo> I just know the mechanics, for the most part. But not the best way to implement in SS>
57: [03:04:53] <UncleCheese> i would do Term -> many_many -> Term, also
58: [03:04:54] <Motoservo> The requirements, I meant.
59: [03:05:09] <UncleCheese> just in case he wants to claim a synonym more than once
60: [03:05:33] <Motoservo> Interesting. I’ll ponder that.
61: [03:05:49] <Motoservo> I haven’t done much relations work so I think inside the box.
62: [03:06:49] <Motoservo> So, don’t name the relation synonyms? But Term, instead. Guess I’m not understanding.
63: [03:07:55] <Motoservo> I’m thinking you’re saying, by “claim more than once” that he may assign the syn in reverse?
64: [03:08:21] <Motoservo> smart assigned to clever. And clever assigned to smart?
65: [03:08:32] <UncleCheese> i'll write something up
66: [03:08:48] <Motoservo> Thank you so much for your trouble.
67: [03:12:10] <UncleCheese> http://pastie.org/10126103
68: [03:13:54] <Motoservo> Okay, lemme read it and figure out what you did.
69: [03:14:03] <UncleCheese> here's a nicer version that filters out the term from the list of synomyms http://pastie.org/10126105
70: [03:14:44] <UncleCheese> oops.. that should read ->exclude('Term', $this->Term)
71: [03:14:47] <UncleCheese> not the =>
72: [03:15:01] <UncleCheese> or put it in an array()
73: [03:15:02] <UncleCheese> either way
74: [03:15:30] <Motoservo> Okay, I’ll adjust that.
75: [03:16:12] <Motoservo> All that you wrote is new to me so I’ll have to study up to understand it. But now I know exactly what to research.
76: [03:16:19] <Motoservo> Thanks so much!
77: [03:17:50] <Motoservo> I was going about it all wrong, I see. I didn’t realize I could do that stuff on the dataobject itself. I’m learning some new tricks, UncleCheese.
78: [03:18:06] <UncleCheese> cool
79: [03:18:39] <UncleCheese> btw, checkboxsetfield won't scale very well
80: [03:18:44] <UncleCheese> 100+ results in a list.. bad
81: [03:18:57] <UncleCheese> i woiudl use ListboxField for large datasets
82: [03:19:09] <UncleCheese> it's the UX you see when adding groups to a user in Security
83: [03:19:49] * joelpittet quit (Remote host closed the connection)
84: [03:20:14] <Motoservo> Ah. What would scale better?
85: [03:20:42] <Motoservo> i think there will be over 5000.
86: [03:20:49] * joelpittet has joined #silverstripe
87: [03:20:49] <UncleCheese> oh christ
88: [03:20:54] <Motoservo> Can break down into letters.
89: [03:20:58] <UncleCheese> yeah, deal with that problem later
90: [03:20:59] <UncleCheese> haha
91: [03:21:05] <UncleCheese> you'll need something asyncrhonous
92: [03:21:13] <UncleCheese> like a tag field, for instance
93: [03:21:35] <Motoservo> or, Term ranges like in a dictionary: cat - crazy
94: [03:21:38] <Motoservo> sort of thing.
95: [03:21:51] <Motoservo> I’ll research that.
96: [03:21:55] <UncleCheese> it's a lot of data to send down to the client
97: [03:22:19] <Motoservo> Saving this whole chat to read and reread.
98: [03:22:22] <UncleCheese> with checkboxsetfield or listboxfield, you're going to get all those records in the form of html or json at render time
99: [03:22:40] <UncleCheese> 5,000 is way too much for that.. you'll need something that looks them up asynchronously
100: [03:22:45] <UncleCheese> tagfield does that
101: [03:22:52] <UncleCheese> synomyms are essentially just tags
102: [03:23:04] <Motoservo> Okay. Putting that on my list to research.
103: [03:23:15] <UncleCheese> tagfield is a bit in flux right now
104: [03:23:17] <Motoservo> Is that part of Gridfield?
105: [03:23:29] <UncleCheese> ss just released a new version of the blog module and it has a much improved tagfield
106: [03:23:44] <UncleCheese> so make sure you're using something that has been updated recently.. the old version is quite shit
107: [03:23:51] <Motoservo> Gotcha.
108: [03:27:16] <Motoservo> I deleted both of those addFieldToTab statements on HomeworkPage, UncleCheese. I was thinking they were no longer needed. But now there’s no interface after adding that bit on the dataobject’s page. Am I to keep the 2nd addFieldToTab that has the datagrid?
109: [03:28:08] <UncleCheese> you only need the second one
110: [03:28:12] <UncleCheese> get rid of the textfield
111: [03:28:51] <Motoservo> okay.
112: [03:30:24] <Motoservo> I couldn’t see on the paste page because it didn’t wrap but now I see you fixed that statement, too.
113: [03:38:01] <Motoservo> That part you should should read ->exclude('Term', $this->Term). Where is that, UncleCheese ?
114: [03:39:58] <Motoservo> typo. Meant, “that part you said should”...
115: [03:41:22] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
116: [05:01:52] * r_hector has joined #silverstripe
117: [05:09:13] * babak has joined #silverstripe
118: [07:08:09] * tmro quit (Max SendQ exceeded)
119: [07:18:58] * tmro has joined #silverstripe
120: [07:26:55] * wmk has joined #silverstripe
121: [07:57:55] * joelpittet quit (Remote host closed the connection)
122: [08:05:38] * gelignite has joined #silverstripe
123: [08:12:42] * Err404NotFound quit (Ping timeout: 264 seconds)
124: [08:13:39] * Err404NotFound has joined #silverstripe
125: [08:43:01] * wmk quit (Ping timeout: 264 seconds)
126: [09:07:43] * cloph_away has joined #silverstripe
127: [09:24:59] * henkpoley has joined #silverstripe
128: [11:10:27] * Azure has joined #silverstripe
129: [11:23:55] * Azure quit (Quit: Oops.)
130: [11:24:20] * Azure has joined #silverstripe
131: [11:25:30] * henkpoley quit (Quit: henkpoley)
132: [11:35:18] * Azure quit (Read error: Connection reset by peer)
133: [11:35:55] * Azure has joined #silverstripe
134: [11:39:02] * babak quit (Quit: Connection closed for inactivity)
135: [12:17:50] * Shrike_Finland has joined #silverstripe
136: [13:21:42] * darjus01 has joined #silverstripe
137: [13:23:14] <darjus01> Hi all is any way to make button in settings admin area called Delete all events then its press function delete events activates.
138: [13:23:17] <darjus01> ?
139: [13:27:06] * Shrike_Finland quit (Quit: Leaving.)
140: [13:35:16] * Azure quit (Ping timeout: 240 seconds)
141: [13:41:35] * Azure has joined #silverstripe
142: [13:52:38] * wmk has joined #silverstripe
143: [13:58:52] * Error404NotFound has joined #silverstripe
144: [14:00:47] * Err404NotFound quit (Ping timeout: 256 seconds)
145: [14:09:03] * babak has joined #silverstripe
146: [14:15:31] * wmk quit (Ping timeout: 256 seconds)
147: [14:24:50] <ss23> https://twitter.com/liamosaur/status/594762346473525248
148: [14:24:52] <ss23> im the ss23 on the left
149: [14:30:41] * r_hector quit (Quit: Leaving.)
150: [14:30:46] <darjus01> Hi all is any way to make button in settings admin area called Delete all events then its press function delete events activates?
151: [15:39:06] * Azure quit (Quit: Oops.)
152: [16:18:01] * darjus01 quit (Ping timeout: 246 seconds)
153: [17:05:38] * ss31noob has joined #silverstripe
154: [17:06:55] <ss31noob> hi.. i am trying to use the autocompletefield module in widget but i am getting an error "Call to a member function FormAction() ".. has anyone know how to fix this?
155: [17:19:02] * babak quit (Quit: Connection closed for inactivity)
156: [18:51:59] * joelpittet has joined #silverstripe
157: [18:52:13] * Azure has joined #silverstripe
158: [19:23:31] * ss31noob quit (Ping timeout: 246 seconds)
159: [19:40:04] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
160: [19:43:36] * ss31noob has joined #silverstripe
161: [19:44:33] <ss31noob> hi.. i am trying to use the autocompletefield module in widget but i am getting an error "Call to a member function FormAction() ".. has anyone know how to fix this?
162: [20:31:53] * babak has joined #silverstripe
163: [20:44:52] * UncleCheese has joined #silverstripe
164: [20:48:39] <UncleCheese> Motoservo [15:14:02] <@UncleCheese> here's a nicer version that filters out the term from the list of synomyms http://pastie.org/10126105
165: [20:51:57] * Ryan-Toast has joined #silverstripe
166: [21:06:41] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
167: [21:07:41] * joelpittet quit (Remote host closed the connection)
168: [21:09:03] * Hailwood has joined #silverstripe
169: [21:16:57] * camfindlay has joined #silverstripe
170: [21:19:46] * joelpittet has joined #silverstripe
171: [21:20:19] * joelpittet quit (Remote host closed the connection)
172: [21:20:43] * joelpittet has joined #silverstripe
173: [21:21:11] * joelpittet quit (Remote host closed the connection)
174: [21:22:10] <Ryan-Toast> camfindlay: Morning, man. Any chance of getting a screenshot of the back-end of the new NZTA site, would love to see how you guys handled splitting out suc a huge ammount of information.
175: [21:23:35] <camfindlay> Ryan-Toast: I can find out perhaps, they have been pretty good on the open source side of things (think some modules will come out of the project at some point). I’ll enquire and see.
176: [21:24:12] <Ryan-Toast> camfindlay: Thanks :)
177: [21:28:02] <camfindlay> be good to get someone from there to do a case study at some point too
178: [21:42:25] * tmro quit (Ping timeout: 264 seconds)
179: [21:46:23] * camfindlay quit (Quit: camfindlay)
180: [21:48:42] * tmro has joined #silverstripe
181: [21:56:59] * MichalKleiner has joined #silverstripe
182: [22:11:38] * camfindlay has joined #silverstripe
183: [22:11:59] * camfindlay quit (Client Quit)
184: [22:20:19] * camfindlay has joined #silverstripe
185: [22:26:15] <MichalKleiner> o/ morning all
186: [22:27:25] * joelpittet has joined #silverstripe
187: [22:29:26] <camfindlay> morning MichalKleiner o/
188: [22:32:53] <MichalKleiner> May already, crazy eg
189: [22:32:55] <MichalKleiner> eh
190: [22:33:00] <MichalKleiner> time flying by so fast
191: [22:33:39] <MichalKleiner> june, skiing and it's nearly Christmas
192: [22:33:41] * irogue_ has joined #silverstripe
193: [22:34:48] <irogue_> holy shit ed's here
194: [22:34:50] <irogue_> ;)
195: [22:45:39] * UncleCheese has joined #silverstripe
196: [22:47:52] * Cheddam has joined #silverstripe
197: [22:56:07] * mahfuz has joined #silverstripe
198: [22:59:02] * babak quit (Quit: Connection closed for inactivity)
199: [23:04:12] * Azure quit (Remote host closed the connection)
200: [23:04:47] * Azure has joined #silverstripe
201: [23:07:37] * Colin[pi] has joined #silverstripe
202: [23:08:02] <Colin[pi]> morning all o/
203: [23:13:30] <adrexia> woah, ed's here.
204: [23:15:08] <Colin[pi]> so he is
205: [23:15:16] <Colin[pi]> adrexia: o/
206: [23:15:58] <adrexia> I don't get that emoticon
207: [23:16:06] <adrexia> is it waving?
208: [23:16:51] <Colin[pi]> adrexia: it's heil hitler
209: [23:17:34] <adrexia> ...
210: [23:18:31] <adrexia> :P
211: [23:18:33] <Colin[pi]> adrexia: :P
212: [23:18:35] <Colin[pi]> yes it'
213: [23:18:38] <Colin[pi]> it's waving
214: [23:19:15] <adrexia> \o
215: [23:19:26] <adrexia> \o/
216: [23:19:42] <adrexia> now it has two arms
217: [23:19:57] <adrexia> \o_
218: [23:20:04] <adrexia> now it's drowning
219: [23:20:16] * simon_w|air has joined #silverstripe
220: [23:20:25] <Colin[pi]> slow day at the office adrexia? ;P
221: [23:20:31] <adrexia> :P
222: [23:20:55] <adrexia> _o/
223: [23:21:09] <irogue_> in case any Auckland folk here don't know yet, http://www.meetup.com/SilverStripe-Auckland/events/222007944/
224: [23:23:00] <Colin[pi]> heya irogue_
225: [23:23:18] <irogue_> mornin' Colin[pi]
226: [23:23:34] <Ryan-Toast> irogue_: IM ALREADY GOING, STOP PUSHING YOUR AGENDA!
227: [23:23:39] <Ryan-Toast> :)
228: [23:25:34] <Colin[pi]> what agenda is that?
229: [23:25:37] <Colin[pi]> BEER?
230: [23:28:29] * Liquide quit ()
231: [23:28:59] * Cheddam quit (Ping timeout: 245 seconds)
232: [23:42:20] * spronk2 has joined #silverstripe
233: [23:44:51] <Colin[pi]> is it a holiday over there today?
234: [23:45:30] <adrexia> here? no
235: [23:46:02] <Colin[pi]> seems quiet in here :o
236: [23:47:27] <irogue_> is monday, noone's fully awake yet
237: [23:47:45] <Colin[pi]> heh fair enough :D

These logs were automatically created by ss-log on irc.freenode.net.