Lukas Renggli | 1 Apr 09:27 2006
Picon
Picon

Re: "pretty" urls for links to internal pages?


On 31 Mar 2006, at 22:51, Brian Chapados wrote:

> Hi,
>
> I'm new to smalltalk, seaside and pier. I want to use pier to host  
> a small
> site, and if possible, I'd like to change the way internal links to  
> other
> pages are rendered, so that the wiki text:
>
> *Introduction>introduction*
>
> produces the link:
> http://localhost:9090/seaside/pier/information/introduction
>
> instead of:
> http://localhost:9090/seaside/pier/information/introduction? 
> view=PRDefaultView&command=PRViewCommand&_k=jFcQckKB&25&_s=lEBbpcqiBRM 
> HlTFF
>
> Both links return the same URL when typed into the browser, so clearly
> view is the default command. I've tried searching around for  
> information
> about this but I couldn't find anything obvious to me. While  
> browsing the
> source code, I came across WAUrl adaptToContext: and WAAnchorTag  
> goto:,
> which look potentially relevant, but I'm honestly not sure if I'm  
> on the
(Continue reading)

Lukas Renggli | 1 Apr 09:26 2006
Picon
Picon

Re: "pretty" urls for links to internal pages?

Hi,

> I'm new to smalltalk, seaside and pier. I want to use pier to host  
> a small
> site, and if possible, I'd like to change the way internal links to  
> other
> pages are rendered, so that the wiki text:
>
> *Introduction>introduction*
>
> produces the link:
> http://localhost:9090/seaside/pier/information/introduction
>
> instead of:
> http://localhost:9090/seaside/pier/information/introduction? 
> view=PRDefaultView&command=PRViewCommand&_k=jFcQckKB&25&_s=lEBbpcqiBRM 
> HlTFF

this is simple to do, have a look #goto: in WAAnchorTag. However I  
strongly discourage you doing this, since ...

- it will start a new session every time you click a link.

- you will loose all the state of your application when clicking a  
link, e.g. most widgets won't work anymore.

- waste a lot of memory and cpu-time on the server, because the url  
has to be parsed and all Seaside components have to be rebuild and  
reinitialized on every click.

(Continue reading)

Frank Urbach | 3 Apr 15:17 2006

Tabs for pier

Hi all,
 
I want to indent some parts of text in pier. But I didn't see in the syntax-introduction these things. Can anybody advise me for this.
Thanks in advance.
 
Cheers,
 Frank

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_______________________________________________
Smallwiki mailing list
Smallwiki <at> impara.de
http://impara.de/mailman/listinfo/smallwiki
Lukas Renggli | 3 Apr 18:58 2006
Picon
Picon

Re: Tabs for pier

> I want to indent some parts of text in pier. But I didn't see in  
> the syntax-introduction these things. Can anybody advise me for this.
> Thanks in advance.

You could use HTML, something like:

	<blockquote>Indented Text</blockquote>

Cheers,
Lukas

--

-- 
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Lukas Renggli | 5 Apr 13:18 2006
Picon
Picon

Re: Re-2: Tabs for pier

Hi Frank,

> With some easy things in css I was able to realize what I want in  
> HTML. But what do you think about syntax extension of pier to do  
> such things like
> :indented_text.
> I found this behavior in another wiki and it helps for readability  
> of the text.
> Sure I can use HTML but writing of such things written above is  
> much easier.

I tried to keep the syntax as simple as possible. However there were  
several requests lately for that kind of things. I don't really know,  
how we could implement that the simplest without bloating the wiki- 
syntax and while keeping the visitors small that transform the AST  
into different output-formats (HTML, Text, Latex, etc).

The best idea I cam up so far is to add some sort of XML-Tags that  
can be parsed in a generic fashion, so that extensions can register  
their own tags. Something along ...

<pier:indented>
The time is now: <pier:smalltalk>Time now</pier:smalltalk>
</pier:indented>

Would that help? Is something like that of generic interest?

> I've been searching in the code for the place of translation from  
> *..* and others to HTML and coming down to PRDocumentScanner  
> scanForToken and see the scannerDefinitionComment on class-side.  
> The next step to define a new element would be very interesting.

The scanner and parser is automatically generated from the respective  
definitions using SmaCC, so you probably don't want to change these  
methods manually ;-)

If you only want to do some simple string transformations when  
generating HTML you could simply patch the methods from the protocol  
#visiting-document in the class PRViewRenderer.

Cheers,
Lukas

--

-- 
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Frank Urbach | 5 Apr 16:05 2006

Re-4: Tabs for pier

Hi, Lukas!

I can understand that a simple syntax keep it easy writing some content. 
My intention was keeping fingertips writing my ideas in the wiki. On the other
side the idea using some sort of XML-tags bring us the possibility write
some extensions like a building set. 
I'm not so familiar with XML but in my understanding of this we could bring
the translation to other formats into the tags. With an open repository of 
these buildingblocks everybody can decide what he want. 
The loosers in this kind of solution are my fingers ;-). 

> > Sure I can use HTML but writing of such things written above is  
> > much easier.
> 
> I tried to keep the syntax as simple as possible. However there were  
> several requests lately for that kind of things. I don't really know,  
> how we could implement that the simplest without bloating the wiki- 
> syntax and while keeping the visitors small that transform the AST  
> into different output-formats (HTML, Text, Latex, etc).
> 
> The best idea I cam up so far is to add some sort of XML-Tags that  
> can be parsed in a generic fashion, so that extensions can register  
> their own tags. Something along ...
> 
> <pier:indented>
> The time is now: <pier:smalltalk>Time now</pier:smalltalk>
> </pier:indented>
> 
> Would that help? Is something like that of generic interest?
> 
> > I've been searching in the code for the place of translation from  
> > *..* and others to HTML and coming down to PRDocumentScanner  
> > scanForToken and see the scannerDefinitionComment on class-side.  
> > The next step to define a new element would be very interesting.
> 
> The scanner and parser is automatically generated from the respective  
> definitions using SmaCC, so you probably don't want to change these  
> methods manually ;-)

My mistake. Is it possible to add a comment "Do not touch, it's generated"?

Cheers,
  Frank

> If you only want to do some simple string transformations when  
> generating HTML you could simply patch the methods from the protocol  
> #visiting-document in the class PRViewRenderer.
> 
> Cheers,
> Lukas
> 
> -- 
> Lukas Renggli
> http://www.lukas-renggli.ch
> 
> 
> 
> 

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Philippe Marschall | 5 Apr 16:50 2006
Picon

Re: Re-2: Tabs for pier

> I tried to keep the syntax as simple as possible. However there were
> several requests lately for that kind of things. I don't really know,
> how we could implement that the simplest without bloating the wiki-
> syntax and while keeping the visitors small that transform the AST
> into different output-formats (HTML, Text, Latex, etc).
>
> The best idea I cam up so far is to add some sort of XML-Tags that
> can be parsed in a generic fashion, so that extensions can register
> their own tags. Something along ...
>
> <pier:indented>
> The time is now: <pier:smalltalk>Time now</pier:smalltalk>
> </pier:indented>
>
> Would that help? Is something like that of generic interest?

I like the idea of having the possibility to hook into the document
model without having to change the syntax/scanner/parser. Only this
makes it possible to combine several of these exentions. Dokuwiki uses
a very similar model for it's plugins:
http://wiki.splitbrain.org/wiki%3Aplugins

I understand you want to keep the syntax as simple as possible but
still to differ extensions (or pulgings or whatever we will call them)
from normal XML markup I'd like to have a different syntax. Eg:
[indented]
The time is now: [smalltalk]Time now[/smalltalk]
[/indented]
They would be parsed into an ExtensionNode or whatever. You could also
search the subclasses for the one with the correct tag (eg:
"indented") and instantiate this one directly instead of the
superclass (ExtensionNode).

Cheers
Philippe

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Lukas Renggli | 9 Apr 23:27 2006
Picon
Picon

Magritte Load Problem

Some people reported problems loading the latest version of Magritte.  
I renamed a class that registered for system-change notifications and  
during the load-operation of Monticello it points to an obsolete  
class making it impossible to compile any method in the system.

To solve the problem simply evaluate the expression below, before  
loading a recent version of Magritte:

MABuilder allSubInstancesDo: [ :each |
	SystemChangeNotifier uniqueInstance
		noMoreNotificationsFor: each ].
Smalltalk garbageCollect.

Sorry for the inconveniance!

Cheers,
Lukas

--

-- 
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Chad Nantais | 11 Apr 01:10 2006
Picon

Button text in forms

When I am rendering a model using "MYQueryModel new asComponent", I want the text on the Magritte-generated form's 'Save' button to read something else like 'Search'.  How do I do this, if it is even possible.  I am trying to use descriptions for a query object and want the same action as the default 'Save' (to answer the object) , but having a button with that label will confuse users.

Thanks in advance.

Chad


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_______________________________________________
Smallwiki mailing list
Smallwiki <at> impara.de
http://impara.de/mailman/listinfo/smallwiki
Lukas Renggli | 11 Apr 06:52 2006
Picon
Picon

Re: Button text in forms

> When I am rendering a model using "MYQueryModel new asComponent", I  
> want the text on the Magritte-generated form's 'Save' button to  
> read something else like 'Search'.  How do I do this, if it is even  
> possible.  I am trying to use descriptions for a query object and  
> want the same action as the default 'Save' (to answer the object) ,  
> but having a button with that label will confuse users.

So I suppose that MYQueryModel is a subclass of PRCommand, right? If  
this is the case you should override #asComponent, else I don't quite  
understand your question.

PRComponent>>asComponent
	^ super asComponent
		addValidatedForm;
		yourself

MYQueryModel>>asComponent
	^ (self description asComponentOn: self)
		addValidatedForm: #( search );
		yourself

Don't forget to add #search as an extension method to  
MAContainerComponent.

Cheers,
Luakas

--

-- 
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki

Gmane