My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 99 attachment: Newbie help - DetailsView only visible for alternate clicks in listbox.eml.txt (18.3 KB)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
Subject:
RE: Newbie help - DetailsView only visible for alternate clicks in listbox
From:
"Stefan Hotmail" <vandammestefan@hotmail.com>
Date:
Wed, 22 Apr 2009 22:54:02 +0200
To:
"'Colin Goldberg'" <colin.goldberg@macmicro.com>

It seem the bug is not reported. You may report this issue on the website.



The older version number of the GD I send to you is:

1.1.0708.17471 Google Desktop SDK (18 May 2008)

You can also download this on the Google Desktop Developer forum => GD_SDK_20080518.zip



The new version you can be using is this:

1.1.0708.17471 Google Desktop SDK (29 January 2009)



Kind Regards,

Stefan Van Damme (aka Stefan vd)

Gadget Developer



Van: Colin Goldberg [mailto:colin.goldberg@macmicro.com]
Verzonden: woensdag 22 april 2009 22:33
Aan: Stefan Hotmail
Onderwerp: Re: Newbie help - DetailsView only visible for alternate clicks in listbox



Can you identify which issue # relates to this problem? If it is not there perhaps you or I should report it. Which is the older version that is OK?

Colin Goldberg
View my LinkedIn Profile
Lead Follow-Up - a Salesforce.com App
MacMicro Inc - Web Applications & Services
BizConnector - for Contextual Interaction
+1 914 472-8292



Stefan Hotmail wrote:

Normal this bug have been report to Google.

See here the website of all bugs that have been send to the Google Desktop Team.

http://code.google.com/p/google-desktop-sdk/issues/list



The version I give to you is a stabile version of Google Desktop Designer.



Don’t forget to write a message in the Google Desktop Developer forum that this problem is solved.

A thanks word,…

And problem solve by using a old GD designer …



So other users know what to do if they also got this problem.



Kind Regards,

Stefan Van Damme (aka Stefan vd)

Gadget Developer





Van: Colin Goldberg [mailto:colin.goldberg@macmicro.com]
Verzonden: woensdag 22 april 2009 22:12
Aan: Stefan Hotmail
Onderwerp: Re: Newbie help - DetailsView only visible for alternate clicks in listbox



Is this bug known to Google? Should I report it? How would I do this? Is there any workaround for me until Google fixes this?

Colin Goldberg
View my LinkedIn Profile
Lead Follow-Up - a Salesforce.com App
MacMicro Inc - Web Applications & Services
BizConnector - for Contextual Interaction
+1 914 472-8292



Stefan Hotmail wrote:

You got the latest newest Google Gadget Designer, but there is some bug inside that version.(display now correct the detailview …)



You gadget seem to work well normal on this older version of Google Gadget Designer.



Kind Regards,

Stefan Van Damme (aka Stefan vd)

Gadget Developer



Van: Colin Goldberg [mailto:colin.goldberg@macmicro.com]
Verzonden: woensdag 22 april 2009 21:52
Aan: Stefan Hotmail
Onderwerp: Re: Newbie help - DetailsView only visible for alternate clicks in listbox



I have 1.1.0708.17471

Colin Goldberg
View my LinkedIn Profile
Lead Follow-Up - a Salesforce.com App
MacMicro Inc - Web Applications & Services
BizConnector - for Contextual Interaction
+1 914 472-8292



Stefan Hotmail wrote:

Hi,

What version number of Google Desktop Gadget Designer does you have?

See on menu help->about



Because a older GD gadget designer does contain a bug inside, that conflict the listbox control and detailview.



Kind Regards,

Stefan Van Damme (aka Stefan vd)

Gadget Developer





Van: Colin Goldberg [mailto:colin.goldberg@macmicro.com]
Verzonden: woensdag 22 april 2009 21:05
Aan: Stefan vd
Onderwerp: Re: Newbie help - DetailsView only visible for alternate clicks in listbox



Dear Stefan,

Thank you for your interest. Here it is - attached. Please note that you will find some unused variables etc. - because I have been experimenting and trying out various approaches.

I look forward to hearing from you again.

Kind regards

Colin Goldberg
View my LinkedIn Profile
Lead Follow-Up - a Salesforce.com App
MacMicro Inc - Web Applications & Services
BizConnector - for Contextual Interaction
+1 914 472-8292



Stefan vd wrote:

Yes, It's handy if you send it to a zip file.

So I can see easy what going wrong ....



Note: this message is not publish online on the forum



Kind Regards,

Stefan Van Damme (aka Stefan vd)

Gadget Developer



On 22 apr, 20:13, Colin <colin.goldb...@gmail.com> wrote:



Hi Stefan,



I'm sorry - I don't mean to be confusing - I just left out code that I

thought was not immediately relevant, so as to not clutter up my

message.



As I showed before, in my lb_onchange() function I had:

var alert = lfuUserInfo.allAlerts[alert_ix];



and also:

var lfuUserInfo;



I have constructor functions as follows:



function constructUserInfo(username, password) {

this.username = username;

this.password = password;

this.user_id = null;

this.allAlerts = new Array();

this.isLoggedIn = false;



}



and for constructing alerts that are received in a XmlHttpResponse.



function constructAlert(alertItem) {//used with SimpleXmlParser

...

//Gets values such as this.alert_id, this.contact_name, etc.

...



}



As I can see from debug trace, these values are received properly.



So using SimpleXmlParser I place values in array lfuUserInfo.allAlerts

- such as in:



function getAlertsResponse(parser, alertList) {//used with

SimpleXmlParser

debug.trace("getAlertsResponse()");

if (alertList.length > 0) {

for (var i = 0; i < alertList.length ; i++) {

lfuUserInfo.allAlerts[lfuUserInfo.allAlerts.length] = new

constructAlert(alertList[i]);

}

var newAlert = showAlerts();

}

else {

var newAlert = view.appendElement('<div>No new alerts...</div>');

}



}



function showAlerts() {

debug.trace("showAlerts()");

for (var i=0; i<lfuUserInfo.allAlerts.length; i++) {

var alert = lfuUserInfo.allAlerts[i];

var alert_txt = alert.contact_name + '-' + alert.action_type;

var alert_item = '<item height="24" name="item0"><label height="24"

align="center" valign="middle">' + alert_txt + '</label></item>';

var newAlert = listbox.appendElement(alert_item);

}

return newAlert;



}



So my question still remains - What is causing the detailsview to not

appear even though the

detailsView_onOpen() function is clearly being executed?



If you like I can send you a zip file of the gadget privately - that

may make it easier.



(Also, I did read the article athttp://code.google.com/apis/desktop/articles/e12.htm

- I based some of my gadget on it).



Kind regards

Colin Goldberg



On Apr 22, 10:51 am, Stefan vd <vandammeste...@hotmail.com> wrote:









Hi Colin,



I check this part of code and ...



detailsView.detailsViewData.putValue("alert", alert);

// Set a reference to the "closeDetailsView" function in the

detailsViewData

detailsView.detailsViewData.putValue("closeDetailsView",

closeDetailsView);



function closeDetailsView() {plugin.CloseDetailsView();}



Is there not missing this code for the alert?

function alert() {something}



Kind Regards,

Stefan Van Damme (aka Stefan vd)

Gadget Developer



On 22 apr, 16:23, Colin <colin.goldb...@gmail.com> wrote:



Hi,



Yes, I have declared the variables upfront

eg.

var lfuUserInfo;



and in function view_onOpen() I have:

...

lfuUserInfo = new constructUserInfo(username, password); //Constructor

exists and seems to be fine

...



That all seems to be working.



It is the statement:

plugin.showDetailsView(detailsView, "Alert",

gddDetailsViewFlagToolbarOpen, onDetailsViewFeedback);



and related issues which seem to be missing something.



So, for example, in the following action sequence:



1. I click on the first listbox entry (identified by name 'Paul

McQuade')

- no detailsview appears

- debug trace shows:

10:07:42.978 - Trace: lb_onchange: alert ix=0

10:07:42.980 - Trace: lb_onchange: detailsView done

10:07:43.78 - Trace: lb_onchange: detailsView SetContent done

10:07:43.83 - Trace: detailsView_onOpen()

10:07:43.85 - Trace: detailsView_onOpen: label1_txt 1=Paul McQuade



2. I click on the second listbox entry ('Michael Vinal')

- the detailsview appears

- debug trace shows:

10:08:12.173 - Trace: lb_onchange: alert ix=1

10:08:12.175 - Trace: lb_onchange: detailsView closed

10:08:12.176 - Trace: lb_onchange: detailsView done

10:08:12.196 - Trace: lb_onchange: detailsView SetContent done

10:08:12.202 - Trace: detailsView_onOpen()

10:08:12.204 - Trace: detailsView_onOpen: label1_txt 1=Michael Vinal



3. I click on the third listbox entry ('Joe Ciavatta')

- no detailsview appears

-debug trace shows:

10:16:29.761 - Trace: lb_onchange: alert ix=2

10:16:29.763 - Trace: lb_onchange: detailsView closed

10:16:29.765 - Trace: lb_onchange: detailsView done

10:16:29.806 - Trace: lb_onchange: detailsView SetContent done

10:16:29.812 - Trace: detailsView_onOpen()

10:16:29.813 - Trace: detailsView_onOpen: label1_txt 1=Joe Ciavatta



4. I click on the first listbox entry again ('Paul McQuade')

- the detailsview appears

- debug trace shows:

10:18:08.916 - Trace: lb_onchange: alert ix=0

10:18:08.919 - Trace: lb_onchange: detailsView closed

10:18:08.921 - Trace: lb_onchange: detailsView done

10:18:08.975 - Trace: lb_onchange: detailsView SetContent done

10:18:08.984 - Trace: detailsView_onOpen()

10:18:08.985 - Trace: detailsView_onOpen: label1_txt 1=Paul McQuade



What is causing the detailsview to not appear even though the

detailsView_onOpen() function is clearly being executed?



Kind regards

Colin Goldberg



On Apr 22, 4:01 am, Stefan vd <vandammeste...@hotmail.com> wrote:



Hi,



Do have named this variabele with a action? (declare a variable to

specify its name and characteristics)

var lfuUserInfo = ...

var allAlerts =...



And do you also read this article about DetailsView:http://code.google.com/apis/desktop/articles/e12.html



Kind Regards,

Stefan Van Damme (aka Stefan vd)

Gadget Developer



On Apr 22, 4:18 am, Colin <colin.goldb...@gmail.com> wrote:



That didn't help. Clicking on a listbox item produced no activity at

all.



Kind regards

Colin Goldberg



On Apr 21, 4:06 pm, Stefan vd <vandammeste...@hotmail.com> wrote:



Hi,



If you want to show the DetailsView on a click. You must change the

'onchange' to 'onclick' in you listbox object.



<listbox height="150" name="listbox" width="100%" x="0" y="20"

background="#FFFFFF"

itemHeight="24" itemOverColor="#CCFFCC" onclick="lb_onchange()"

autoscroll="true" itemSelectedColor="#99FF99"/>



Kind Regards,

Stefan Van Damme (aka Stefan vd)

Gadget Developer



On Apr 21, 5:32 pm, Colin <colin.goldb...@gmail.com> wrote:



Hi,



As a newbie to gadget development, I have a question relating to the

behavior opening a DetailsView window. Basically, the DetailsView

window appears (ie. is visible) for alternate clicks in the listbox in

my main view - and not each time. But debug.trace shows me that the

detailsView_onOpen() function is being called every time. Is it

something to do with the flags (gddDetailsViewFlagToolbarOpen, etc.)?



in My main view, I have:

<listbox height="150" name="listbox" width="100%" x="0" y="20"

background="#FFFFFF"

itemHeight="24" itemOverColor="#CCFFCC" onchange="lb_onchange()"

autoscroll="true" itemSelectedColor="#99FF99"/>



I initialize detailsView at the top:

var detailsView = new DetailsView();



And function lb_onchange is:



function lb_onchange() {

var selectedItem = listbox.selectedItem;

var alert_ix = listbox.selectedIndex;

var alert = lfuUserInfo.allAlerts[alert_ix];

debug.trace("lb_onchange: alert ix="+alert_ix);

//var detailsView = new DetailsView(); //done on initialization

debug.trace("lb_onchange: detailsView done");

detailsView.SetContent( "", undefined, "details.xml", false, 0);

debug.trace("lb_onchange: detailsView SetContent done");

detailsView.detailsViewData.putValue("alert", alert);

// Set a reference to the "closeDetailsView" function in the

detailsViewData

detailsView.detailsViewData.putValue("closeDetailsView",

closeDetailsView);

// Show the details view

plugin.showDetailsView(detailsView, "Alert",

gddDetailsViewFlagToolbarOpen, onDetailsViewFeedback);

detailsViewIsOpen = true;

debug.trace("lb_onchange: showDetailsView done");



}



Also, in my main view:



function closeDetailsView() {

plugin.CloseDetailsView();



}



function onDetailsViewFeedback(detailsViewFlags) {

if (detailsViewFlags == gddDetailsViewFlagNone) {

// User closed the details view

} else if (detailsViewFlags == gddDetailsViewFlagToolbarOpen) {

// User clicked on the title of the details view

}



}



My DetailsView xml is:



<view height="150" width="450" onopen="detailsView_onOpen()">

<img height="150" width="450" x="0" y="0" src="stock_images

\background.png"

/>

<img cursor="hand" enabled="true" name="imgClose" x="320" y="8"

onclick="detailsView_Close()"

src="images\closeBtn.png"/>

<label enabled="true" height="15" name="label1" x="20" y="25"



...



meer lezen »









Powered by Google Project Hosting