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? 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. 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! best regard, camillo
+1 Ben On May 15, 2013, at 10:18 PM, Camillo Bruni <camillobruni@gmail.com> wrote:
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?
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. 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!
best regard, camillo
Hello. 2013/5/16 Camillo Bruni <camillobruni@gmail.com>
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? Best regards, Denis best regard,
camillo
I think what Camillo want is to be able to interact with an object through a Morph Ben On May 16, 2013, at 1:04 PM, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hello.
2013/5/16 Camillo Bruni <camillobruni@gmail.com> 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?
Best regards, Denis
best regard, camillo
On 2013-05-16, at 13:04, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hello.
2013/5/16 Camillo Bruni <camillobruni@gmail.com>
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?
On 16 May 2013 14:37, Camillo Bruni <camillobruni@gmail.com> wrote:
On 2013-05-16, at 13:04, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hello.
2013/5/16 Camillo Bruni <camillobruni@gmail.com>
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?
Yes. That's probably the good reason why Object should have #asMorph protocol. Right now it is a bit far from your idea: Object>>asMorph "Open a morph, as best one can, on the receiver" ^ self asStringMorph P.S. but please do not use "Smalltalk at: put:" in examples, because someone could take it literally :) P.P.S. since inspector lists objects in left-side pane, i think it would be nice to be able to drag item out of it and drop into workspace. The morph should keep a reference to dragged object and represent it as morph, embedded in text or not... and you don't need to keep it somewhere else (e.g in globals). -- Best regards, Igor Stasenko.
2013/5/17 Igor Stasenko <siguctua@gmail.com>
On 16 May 2013 14:37, Camillo Bruni <camillobruni@gmail.com> wrote:
On 2013-05-16, at 13:04, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hello.
2013/5/16 Camillo Bruni <camillobruni@gmail.com>
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?
Yes. That's probably the good reason why Object should have #asMorph protocol.
Right now it is a bit far from your idea:
Object>>asMorph "Open a morph, as best one can, on the receiver"
^ self asStringMorph
P.S. but please do not use "Smalltalk at: put:" in examples, because someone could take it literally :)
P.P.S. since inspector lists objects in left-side pane, i think it would be nice to be able to drag item out of it and drop into workspace. The morph should keep a reference to dragged object and represent it as morph, embedded in text or not... and you don't need to keep it somewhere else (e.g in globals).
It should be one of the options. I personally prefer to drop object into workspace, put name for it and use it as usual workspace variable. Really how you will use "morph reference" of object at multiple places of workspace? How you will refer to it at new expressions?
-- Best regards, Igor Stasenko.
If the workspace also support Morphic Text Inlining, then you could duplicate the variable morphic element, and reuse it later :) Ben On May 16, 2013, at 10:38 PM, Denis Kudriashov <dionisiydk@gmail.com> wrote:
2013/5/17 Igor Stasenko <siguctua@gmail.com> On 16 May 2013 14:37, Camillo Bruni <camillobruni@gmail.com> wrote:
On 2013-05-16, at 13:04, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hello.
2013/5/16 Camillo Bruni <camillobruni@gmail.com>
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?
Yes. That's probably the good reason why Object should have #asMorph protocol.
Right now it is a bit far from your idea:
Object>>asMorph "Open a morph, as best one can, on the receiver"
^ self asStringMorph
P.S. but please do not use "Smalltalk at: put:" in examples, because someone could take it literally :)
P.P.S. since inspector lists objects in left-side pane, i think it would be nice to be able to drag item out of it and drop into workspace. The morph should keep a reference to dragged object and represent it as morph, embedded in text or not... and you don't need to keep it somewhere else (e.g in globals).
It should be one of the options. I personally prefer to drop object into workspace, put name for it and use it as usual workspace variable. Really how you will use "morph reference" of object at multiple places of workspace? How you will refer to it at new expressions?
-- Best regards, Igor Stasenko.
2013/5/16 Camillo Bruni <camillobruni@gmail.com>
On 2013-05-16, at 13:04, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hello.
2013/5/16 Camillo Bruni <camillobruni@gmail.com>
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. Best regards, Denis .
On 16 May 2013 22:32, Denis Kudriashov <dionisiydk@gmail.com> wrote:
2013/5/16 Camillo Bruni <camillobruni@gmail.com>
On 2013-05-16, at 13:04, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hello.
2013/5/16 Camillo Bruni <camillobruni@gmail.com>
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.
Guys can you make you emails short!
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)
Yes me for example + 10
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). ;)
Yes alain is back from holidays soon too :) Stef
Best regards, Denis
-- Best regards, Igor Stasenko.
Denis I think that alain will start to look at TextModel too because we do not want to have rubric competing with it and WE WANT ATHENS IN PHARO BEFORE the end of June. Igor when you are back from holidays we will push athens into Pharo and start hakcing like mad :) Stef On May 16, 2013, at 10:32 PM, Denis Kudriashov <dionisiydk@gmail.com> wrote:
2013/5/16 Camillo Bruni <camillobruni@gmail.com>
On 2013-05-16, at 13:04, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hello.
2013/5/16 Camillo Bruni <camillobruni@gmail.com>
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.
Best regards, Denis .
But, what is the impediment of adding Athens now to the image? Cheers, Doru On Fri, May 17, 2013 at 8:47 AM, stephane ducasse <stephane.ducasse@free.fr>wrote:
Denis
I think that alain will start to look at TextModel too because we do not want to have rubric competing with it and WE WANT ATHENS IN PHARO BEFORE the end of June. Igor when you are back from holidays we will push athens into Pharo and start hakcing like mad :)
Stef
On May 16, 2013, at 10:32 PM, Denis Kudriashov <dionisiydk@gmail.com> wrote:
2013/5/16 Camillo Bruni <camillobruni@gmail.com>
On 2013-05-16, at 13:04, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hello.
2013/5/16 Camillo Bruni <camillobruni@gmail.com>
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.
Best regards, Denis .
-- www.tudorgirba.com "Every thing has its own flow"
But, what is the impediment of adding Athens now to the image?
We are just waiting that igor is here and we were focusing on the new compiler. Stef
Cheers, Doru
On Fri, May 17, 2013 at 8:47 AM, stephane ducasse <stephane.ducasse@free.fr> wrote: Denis
I think that alain will start to look at TextModel too because we do not want to have rubric competing with it and WE WANT ATHENS IN PHARO BEFORE the end of June. Igor when you are back from holidays we will push athens into Pharo and start hakcing like mad :)
Stef
On May 16, 2013, at 10:32 PM, Denis Kudriashov <dionisiydk@gmail.com> wrote:
2013/5/16 Camillo Bruni <camillobruni@gmail.com>
On 2013-05-16, at 13:04, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hello.
2013/5/16 Camillo Bruni <camillobruni@gmail.com>
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.
Best regards, Denis .
-- www.tudorgirba.com
"Every thing has its own flow"
So, there is no impediment then. Great :). The fonts that I made available make it easily possible to change that part, too. Cheers, Doru On Fri, May 17, 2013 at 1:53 PM, stephane ducasse <stephane.ducasse@free.fr>wrote:
But, what is the impediment of adding Athens now to the image?
We are just waiting that igor is here and we were focusing on the new compiler.
Stef
Cheers, Doru
On Fri, May 17, 2013 at 8:47 AM, stephane ducasse < stephane.ducasse@free.fr> wrote:
Denis
I think that alain will start to look at TextModel too because we do not want to have rubric competing with it and WE WANT ATHENS IN PHARO BEFORE the end of June. Igor when you are back from holidays we will push athens into Pharo and start hakcing like mad :)
Stef
On May 16, 2013, at 10:32 PM, Denis Kudriashov <dionisiydk@gmail.com> wrote:
2013/5/16 Camillo Bruni <camillobruni@gmail.com>
On 2013-05-16, at 13:04, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hello.
2013/5/16 Camillo Bruni <camillobruni@gmail.com>
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.
Best regards, Denis .
-- www.tudorgirba.com
"Every thing has its own flow"
-- www.tudorgirba.com "Every thing has its own flow"
Hi all, Yes, TxText is cool. I've still one important feature to implement for synectique then I will try to help. Rubric has the scrolling stuffs (scrolling text, rulers for line numbers, code size feedback, editing mode and soon, user defined selection). I will check if it can/needs to be ported for TxText. Cheers Alain On 17 mai 2013, at 08:47, stephane ducasse <stephane.ducasse@free.fr> wrote:
Denis
I think that alain will start to look at TextModel too because we do not want to have rubric competing with it and WE WANT ATHENS IN PHARO BEFORE the end of June. Igor when you are back from holidays we will push athens into Pharo and start hakcing like mad :)
Stef
On May 16, 2013, at 10:32 PM, Denis Kudriashov <dionisiydk@gmail.com> wrote:
2013/5/16 Camillo Bruni <camillobruni@gmail.com>
On 2013-05-16, at 13:04, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hello.
2013/5/16 Camillo Bruni <camillobruni@gmail.com>
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.
Best regards, Denis .
participants (7)
-
Benjamin -
Camillo Bruni -
Denis Kudriashov -
Igor Stasenko -
plantec -
stephane ducasse -
Tudor Girba