On 16 May 2013 22:32, Denis Kudriashov <[email protected]> wrote:
> 2013/5/16 Camillo Bruni <[email protected]>
>>
>>
>> On 2013-05-16, at 13:04, Denis Kudriashov <[email protected]> wrote:
>> > Hello.
>> >
>> > 2013/5/16 Camillo Bruni <[email protected]>
>> >
>> >> I have a question concerning the new TxText layout.
>> >> How hard is it support inline non-text nodes (aka inline morphs) in a
>> >> text
>> >> layout?
>> >>
>> >
>> > Do you mean supporting "TxMorphSpan" objects from text model at text
>> > layout
>> > level?
>> > I think it is is not hard. Main issue here is supporting such kind of
>> > spans
>> > at text model level. But I think it is not difficult too,
>> > I should look at code to answer in detail (can't do it now).
>> >
>> >
>> >>
>> >> My dream is still to be able to drag and drop an "instance" from an
>> >> inspector to a workspace and do some operations on it using standard
>> >> smalltalk.
>> >
>> >
>> > +1
>> > And I want drag and drop objects between inspectors and between
>> > workspaces.
>> >
>> >
>> >> The only difference here would be instead of using a variable or
>> >> expression to get an instance of something I would have a
>> >> textual/visual
>> >> node directly representing an instance!
>> >>
>> >
>> > I'm not understand it.
>> > By dropping some object to workspace It can create named variable and
>> > then
>> > you can use it for scripting inside workspace.
>> > But what you suggest here? Can you explan deeply?
>>
>>
>> Indeed I am not very clear (as usual :).
>> a) I want to have a morph representing an object
>> b) I want to embed these morphs into text
>> c) I want to interact with these morphs and the text
>>
>> Let's say [Set] is the morph representing a set and I have the following
>> source code with this morph inside:
>>
>>         [Set] includes: #a
>>
>> Then this would be equivalent to the following:
>>
>>         Smalltalk at: #MySetInstance put Set new.
>>
>>         MySetInstance includes: #a
>>
>> However [Set] is not just text but a real morph I can drag around, right
>> click
>> and get a decent, instance specific menu on... and so forth :)
>>
>> is that more clear?
>
>
> Ok. Now I understand what you want.
>
> I look at code.
> As I sad before. TxMorphSpan requires some changes in text model code and
> layout code.
> Now TxLayout is collection of TxLayoutLine's where TxLayoutLine is
> collection of TxLayoutSpan's. And now TxLayoutSpan is interval of
> TxCharacterSpan. So TxLayoutSpan know that it is layout of characters. It
> has font.
> One of the options to support TxMorphSpan layout is to introduce
> TxLayoutMorphSpan and implement all required protocol. To hook up this
> object during layout building you should implement something like:
>
> TxMorphSpan>>layoutContentsBy: aLayoutBuilder
>     aLayoutBuilder currentSpan: (TxLayoutMorphSpan on: self)
>     aLayoutBuilder completeSpan
>
> You see it is quite simple.
>
> Now I almost finich edit decorators stuff. (I have TxNoneEditDecorator,
> TxMaskEditDecorator, TxInsertModeEditDecorator, TxSmartCharsEditDecorator).
> And next my task will validation/filtering of input. I think it will require
> text model changes, so I will think about morph span too.
> And of couse if you again join to TxText development it will be perfect! You
> and Igor started this project.
>

Be assured, i will get there (once i will finish my vacation and
Athens path geometry
functionality ;).

I really appreciate of what you doing (and i know multiple people who
can put +1 here)

The fact that you joined the project by your own will, is what makes
open-source development much more sustainable and powerful, comparing
to "traditional" development behind closed doors.

Because when you write code you don't like (because it's your job
which pays your bills), you just in "get things done" mode,
but when you self-motivated and really care about result (like in
open-source development), the way you do is quite different, and
results too, as a consequence.

I would really like if Alain and you could join the effort to make new editor
be ready for next Pharo release (so we can get rid of confusing and scary code).
;)

> Best regards,
> Denis

-- 
Best regards,
Igor Stasenko.

Reply via email to