Re: [shoes] Re: date picker - widget or module; shoes4 layout and performance
- Tobias Pfeiffer
- 2014-09-02 @ 10:23
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 :-)
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
> 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
> parse at
> load at
> load at
> load_data at
> transaction at
> synchronize at org/jruby/ext/thread/Mutex.java:149
> transaction at
> any ideas?
> 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
>> 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
>>  represents the app with the entire code inside the shoes app and
>> the other  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?
>>  https://gist.github.com/7fddbca9a0f461b27229.git
>>  https://gist.github.com/6c86881d195fdc4a433d.git