CPCoding protocol

11 views
Skip to first unread message

Victor Kazarinov

unread,
Jan 14, 2012, 8:10:59 AM1/14/12
to Kairos Webmail
Hi Vincent,

Perhaps you can point me to some http resources and documents related
CPCoding protocol? I faced with problem in kairos with SMPagerView. It
is GUI control to select page for mail. I want to get current page
number from SMPagerView in MailController.j. I made getter method in
SMPagerView which return current page. In MailController.j I store
reference to created SMPagerView (it is created in toolbar). And later
I use this reference to access SMPagerView, e.g. I call [_pagerView
getPage]. But result page number is wrong. I investigated and found
that it refers _pagerView to wrong instance of SMPagerView. I found
that in each visual object we have implemented CPCoding protocol. I
debugged it and found that object is encrypted into byte stream and
unencrypted later. I don't know who call this (seems like Cappuccino,
but I can't find any docs related this at cappuccino site). As result,
we have in _pagerView variable stored reference to our SMPagerView
which is invisible, but at screen in toolbar of kairos is shown
another instance of SMPagerView, restored from byte stream. That
another instance of SMPagerView is not associated with _pagerView
variable, because this is different (second) instance of SMPagerView
object. So there is 2 controls, one invisible and one visible. Of
course I can imagine another ways to access this visible control
without direct reference to it, but I assume that right way should be
is to use simple direct call like this: [_pagerView getPage] which is
not works currently.

Regards,
Victor Kazarinov

vincent richomme

unread,
Jan 14, 2012, 8:52:06 AM1/14/12
to kairos-...@googlegroups.com
Hi,

You should copy/paste your question to the cappuccino mailing list because I am far from being a cappuccino expert.
Have you seen my last email about alexander fix for the folder renaming ?
You will have to report the fix from kairos-client repository to kairos client, shouldn't be too difficult since only one file 
is concerned.

vincent richomme

unread,
Jan 14, 2012, 8:59:29 AM1/14/12
to kairos-...@googlegroups.com
Intersting language I discovered a few days ago :

For a c# developer like me it's a dream.



2012/1/14 vincent richomme <v.ric...@gmail.com>

Victor Kazarinov

unread,
Jan 14, 2012, 12:44:32 PM1/14/12
to kairos-...@googlegroups.com
Vincent,

Thank you, I found solution in cappuccino mailing list with using search. 
Here is result of my investigation: 
CPToolbar copy its items using binary encoding and decoding (with help of CPCoding protocol which usually used for CP2JavaWS). So visible items in toolbar is not the same which was created initially, so we can't use saved reference to any added controls. To access items in toolbar, need use [toolbar items] and find required item in this array. Then we can get our component via item._view property.
In our case this is [item._view getPage].

Regarding Alexander fix for the folder renaming, yes, I saw that email message. I will integrate that fix soon.
--
With best regards,
Victor Kazarinov
Reply all
Reply to author
Forward
0 new messages