librelist archives

« back to archive

date picker - widget or module; shoes4 layout and performance

date picker - widget or module; shoes4 layout and performance

From:
Sebastjan Hribar
Date:
2014-08-20 @ 19:07
could not decode message

Re: date picker - widget or module; shoes4 layout and performance

From:
Sebastjan Hribar
Date:
2014-08-22 @ 10:17
I forgot to ask about the error below:

When I try to record an expense to YAML store file I get this error message:

Psych::SyntaxError: (<unknown>): mapping values are not allowed here at 
line 3 column 11
            parse at org/jruby/ext/psych/PsychParser.java:215
     parse_stream at 
/home/sebastjan/.rvm/rubies/jruby-1.7.10/lib/ruby/shared/psych.rb:205
            parse at 
/home/sebastjan/.rvm/rubies/jruby-1.7.10/lib/ruby/shared/psych.rb:153
             load at 
/home/sebastjan/.rvm/rubies/jruby-1.7.10/lib/ruby/shared/psych.rb:129
             load at 
/home/sebastjan/.rvm/rubies/jruby-1.7.10/lib/ruby/1.9/yaml/store.rb:66
        load_data at 
/home/sebastjan/.rvm/rubies/jruby-1.7.10/lib/ruby/1.9/pstore.rb:407
      transaction at 
/home/sebastjan/.rvm/rubies/jruby-1.7.10/lib/ruby/1.9/pstore.rb:322
      synchronize at org/jruby/ext/thread/Mutex.java:149
      transaction at 
/home/sebastjan/.rvm/rubies/jruby-1.7.10/lib/ruby/1.9/pstore.rb:316
.
.
.
.

any ideas?
regards,
seba


On 20. 08. 2014 21:07, Sebastjan Hribar wrote:
> Hi guys,
>
> I've finished my master's adventure and I'm again having fun with shoes:)
>
> I'm currently more or less wearing both shoes (green and 4) to see the 
> differences and I have a couple of questions regarding my latest project.
>
> I'm building an expense tracker with tagging by expense categories and 
> various reports.
> For each expense recorded I need to enter the date when the expense 
> occurred. I decided to try and build a date picker as a custom widget. 
> I suppose I should have asked here is someone has already built it:)
>
> The date picker is displayed in a new window and supports the current 
> date selection and selection of any other date by changing months, 
> years (different number of days in a month is taken into account) and 
> when a date is selected a variable is populated with it. See the 
> attachment for sample image.
>
> There are still a few things I could add, but for now it does the job.
>
> I wanted this to be more accessible like a widget, but I encountered 
> undefined method errors (in both shoes). I think Felipe reported the 
> same if I'm not mistaken. So for a workaround I've put everything in 
> methods and those in a module, hopefully breaking as few ruby and 
> shoes rules as possible in the process:)
>
> Is there a better way?
>
> I've made a gist with the source code if someone is interested... One 
> [1] represents the app with the entire code inside the shoes app and 
> the other [2] the above mentioned module with shoes app using only the 
> method.
>
> The second question is about basic layout in shoes. My home page in 
> expense tracker is made up of paras, edit_lines and list_boxes in a 
> stack. The only explicit size is the list_box width. In green_shoes 
> the layout is ok, but in shoes4 list_boxes step on (overlap) the paras 
> below.
>
> The third question is about the performance. When I run an app in 
> shoes4 it takes some time to start and when it does it feels like my 
> box went to hyper if not warp drive:) Is this expected?
>
>
> [1] https://gist.github.com/7fddbca9a0f461b27229.git
> [2] https://gist.github.com/6c86881d195fdc4a433d.git
>
> regards,
> Seba 

Re: [shoes] Re: date picker - widget or module; shoes4 layout and performance

From:
Tobias Pfeiffer
Date:
2014-09-02 @ 10:23
Hi Sebastjan,

sorry for the delay I've been busy with my thesis defense and stuff (it 
went good) :-)

Your problem sounds interesting. I'd be SUPER interested in a bug 
report at shoes4 with the original app and the way you tried to use 
widgets, along with the undefined method errors and stuff so we can fix 
them up and make them work as expected. Maybe it was just a method we 
failed to implement.

About the psych error... no idea. Maybe try upgrading JRuby :-)

Cheers,
Tobi

On Fri 22 Aug 2014 12:17:52 PM CEST, Sebastjan Hribar wrote:
> I forgot to ask about the error below:
>
> When I try to record an expense to YAML store file I get this error
> message:
>
> Psych::SyntaxError: (<unknown>): mapping values are not allowed here
> at line 3 column 11
>            parse at org/jruby/ext/psych/PsychParser.java:215
>     parse_stream at
> /home/sebastjan/.rvm/rubies/jruby-1.7.10/lib/ruby/shared/psych.rb:205
>            parse at
> /home/sebastjan/.rvm/rubies/jruby-1.7.10/lib/ruby/shared/psych.rb:153
>             load at
> /home/sebastjan/.rvm/rubies/jruby-1.7.10/lib/ruby/shared/psych.rb:129
>             load at
> /home/sebastjan/.rvm/rubies/jruby-1.7.10/lib/ruby/1.9/yaml/store.rb:66
>        load_data at
> /home/sebastjan/.rvm/rubies/jruby-1.7.10/lib/ruby/1.9/pstore.rb:407
>      transaction at
> /home/sebastjan/.rvm/rubies/jruby-1.7.10/lib/ruby/1.9/pstore.rb:322
>      synchronize at org/jruby/ext/thread/Mutex.java:149
>      transaction at
> /home/sebastjan/.rvm/rubies/jruby-1.7.10/lib/ruby/1.9/pstore.rb:316
> .
> .
> .
> .
>
> any ideas?
> regards,
> seba
>
>
> On 20. 08. 2014 21:07, Sebastjan Hribar wrote:
>> Hi guys,
>>
>> I've finished my master's adventure and I'm again having fun with shoes:)
>>
>> I'm currently more or less wearing both shoes (green and 4) to see
>> the differences and I have a couple of questions regarding my latest
>> project.
>>
>> I'm building an expense tracker with tagging by expense categories
>> and various reports.
>> For each expense recorded I need to enter the date when the expense
>> occurred. I decided to try and build a date picker as a custom
>> widget. I suppose I should have asked here is someone has already
>> built it:)
>>
>> The date picker is displayed in a new window and supports the current
>> date selection and selection of any other date by changing months,
>> years (different number of days in a month is taken into account) and
>> when a date is selected a variable is populated with it. See the
>> attachment for sample image.
>>
>> There are still a few things I could add, but for now it does the job.
>>
>> I wanted this to be more accessible like a widget, but I encountered
>> undefined method errors (in both shoes). I think Felipe reported the
>> same if I'm not mistaken. So for a workaround I've put everything in
>> methods and those in a module, hopefully breaking as few ruby and
>> shoes rules as possible in the process:)
>>
>> Is there a better way?
>>
>> I've made a gist with the source code if someone is interested... One
>> [1] represents the app with the entire code inside the shoes app and
>> the other [2] the above mentioned module with shoes app using only
>> the method.
>>
>> The second question is about basic layout in shoes. My home page in
>> expense tracker is made up of paras, edit_lines and list_boxes in a
>> stack. The only explicit size is the list_box width. In green_shoes
>> the layout is ok, but in shoes4 list_boxes step on (overlap) the
>> paras below.
>>
>> The third question is about the performance. When I run an app in
>> shoes4 it takes some time to start and when it does it feels like my
>> box went to hyper if not warp drive:) Is this expected?
>>
>>
>> [1] https://gist.github.com/7fddbca9a0f461b27229.git
>> [2] https://gist.github.com/6c86881d195fdc4a433d.git
>>
>> regards,
>> Seba
>

--
www.pragtob.info