[racket-users] Re: Racket good for GUI apps! :)

2018-12-30 Thread Alex Harsanyi
You cannot do that: The control already uses text% snips internally for each
item, but it redefines their `on-default-char` method to discard all 
keyboard
input, which means they are not editable in-line.

If you want to have a look, the implementation for the hierarchical-list%, 
is
in your Racket installation under the "share/pkgs/gui-lib/mrlib/hierlist/"
folder.

Your option is to copy out the hierarchical-list% implementation and modify 
it
yourself. Simply removing the `on-default-char` override might create 
further
problems with how the snip% objects interact with each other and the
pasteboard% object which manages them.

I believe modifying the hierarchical-list% will work, but it involves a lot 
of
work and might not be a good task for someone who just starts out with 
Racket
GUI programming.

Alex.


On Monday, December 31, 2018 at 12:19:16 AM UTC+8, Andre Garzia wrote:
>
> Following the topic of Racket gui apps I decided to ask a question here 
> before I plunge into a rabbit hole from which I may take hours to climb 
> back. I am trying to implement a type of GUI app which is usually called an 
> outliner. Basically it should be a Hierarchical List like the one provided 
> by:
>
>   http://docs.racket-lang.org/mrlib/Hierarchical_List_Control.html 
>
> but with each item being editable. I thought, maybe wrongly, that I could 
> somehow build on top of that control and instead of using a "text%" use 
> some kind of editor or input field for each item by altering the mixin that 
> is used when you add a new item, but so far I don't see how to do it. I am 
> new to Racket Gui stuff and this task is not obvious to me. Can someone 
> here share a clue or two? 
>
> Thanks a lot in advance.
>
> Em domingo, 30 de dezembro de 2018 11:34:23 UTC, spdegabrielle escreveu:
>>
>> There oate other examples but I just saw this:
>>
>>
>> https://twitter.com/id_aa_carmack/status/1079200506139103233?s=21
>>
>> If you like to know more about creating GUI apps in Racket? Just start 
>> here: http://docs.racket-lang.org/gui/index.html
>>
>> S.
>>
>>
>> -- 
>> 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Racket good for GUI apps! :)

2018-12-30 Thread Andre Garzia
Following the topic of Racket gui apps I decided to ask a question here 
before I plunge into a rabbit hole from which I may take hours to climb 
back. I am trying to implement a type of GUI app which is usually called an 
outliner. Basically it should be a Hierarchical List like the one provided 
by:

  http://docs.racket-lang.org/mrlib/Hierarchical_List_Control.html 

but with each item being editable. I thought, maybe wrongly, that I could 
somehow build on top of that control and instead of using a "text%" use 
some kind of editor or input field for each item by altering the mixin that 
is used when you add a new item, but so far I don't see how to do it. I am 
new to Racket Gui stuff and this task is not obvious to me. Can someone 
here share a clue or two? 

Thanks a lot in advance.

Em domingo, 30 de dezembro de 2018 11:34:23 UTC, spdegabrielle escreveu:
>
> There oate other examples but I just saw this:
>
>
> https://twitter.com/id_aa_carmack/status/1079200506139103233?s=21
>
> If you like to know more about creating GUI apps in Racket? Just start 
> here: http://docs.racket-lang.org/gui/index.html
>
> S.
>
>
> -- 
> 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.