Hi all,
I started a tutorial on QCMagritte. I used the seaside tutorial by James Foster (http://seaside.gemtalksystems.com/tutorial.html) as an example, as I believe it should be that easy to use QCMagritte.
I would appreciate it, if someone wants to give it a try. It would consider it a pro if you do not know (QC)Magritte, as I intend to start with the basics. I am now completed chapter 4: a simple todo application.
Cheers,
Diego
On 05 Jun 2014, at 15:16, Esteban A. Maringolo <emaringolo(a)gmail.com> wrote:
> I normally find/feel QCMagritte has a lot of things I could use, but
> with scarce documentation it is really difficult to me to know where
> to start with.
>
> Would you provide a simple example of how to replace #call:/show: with
> announcements?
>
> Regards!
>
> Esteban A. Maringolo
>
>
> 2014-06-04 12:51 GMT-03:00 Stephan Eggermont <stephan(a)stack.nl>:
>> We have very few call:'s left in our apps. Most navigation is done with announcements.
>> We use a session subclass that has an announcer and delegate to that.
>>
>> You can find sample code in both Deltawerken (DESession & DEPageChoice) and QCMagritte
>> (QCSession & QCPageChoice).
>>
>> You can find a pre-made image (for Pharo 2 and 3) at http://ci.inria.fr/pharo-contribution/QCMagritte
>>
>> Stephan_______________________________________________
>> seaside mailing list
>> seaside(a)lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> _______________________________________________
> seaside mailing list
> seaside(a)lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Hi Johan,
I did not know that. So this means, we need a different fix for the problem in the Pier site. I see Johan has reverted the change for JQuery, I now did this for the configuration.
John,
Can you make a fix in the Pier add-on? If you give me your username on smalltalkhub I will add you to the pier team.
Regards,
Diego
On 16 Jun 2014, at 09:40, Johan Brichau <johan(a)inceptive.be> wrote:
> Hi John, Diego,
>
> Seaside 3.1.1 comes with jQuery UI 1.9
> JQuery-UI 1.9+ does _not_ support the onSelect: event. [1]
>
> This method was therefore intentionally removed and may not be added again.
>
> best regards
> Johan
>
> [1] http://api.jqueryui.com/tabs/
>
>
> On 16 Jun 2014, at 09:15, Diego Lont <diego.lont(a)delware.nl> wrote:
>
>> Hi John,
>>
>> Thanks for spotting this and providing a fix.
>>
>> I could not find your user, so I committed your fix myself. I also updated the configuration of Seaside, such that version 3.1.2 of Seaside3 now contains this fix. As this is the development version and Pier depends on the stable (released) version, it will take a bit before this fix is actually included in the build you mention.
>>
>> Cheers,
>> Diego
>>
>> On 15 Jun 2014, at 21:40, John Borden <jborden23(a)mac.com> wrote:
>>
>>> The latest image from https://ci.inria.fr/pharo-contribution/job/Pier3Addons/PHARO=30,VERSION=rel… starts fine, but when editing a page it fails with the error:
>>>
>>> Contents:
>>> MessageNotUnderstood: JQTabs>>onSelect:
>>>
>>> Your request could not be completed. An exception occurred.
>>>
>>> Attached is a fix, would anyone have access to add write permissions for me to http://smalltalkhub.com/mc/Seaside/Seaside31/main/ ?
>>>
>>>
>>>
>>> Thanks,
>>>
>>> John
>>>
>>> <JQuery-UI-JohnCBorden.90.mcz>_______________________________________________
>>> Magritte, Pier and Related Tools ...
>>> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>>
>> _______________________________________________
>> seaside-dev mailing list
>> seaside-dev(a)lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
>
> _______________________________________________
> seaside-dev mailing list
> seaside-dev(a)lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Hi all,
./compile.sh can be passed a parameter to compile only a specific file
rather than the whole book. Now I consider this probably only occurs
during development with a human executing the script (rather than some
CI process which will be processing the whole book) and I'm finding it
useful to automatically fire off a PDF Viewer on the generated file, as
per the line below tagged "ADDED".
if [[ $# -eq 1 ]]; then
dir=$(dirname "$1") # e.g., Zinc
pier_file=$(basename "$1") # e.g., Zinc.pier
pillar_one "$1"
produce_pdf "${dir}" "${pier_file}"
open "${dir}"/"${pier_file}".pdf # <----ADDED
else
pillar_all
compile_chapters
compile_latex_book
fi
Is this something others would find useful? or can you see issues with
it? Having this mod makes my working area dirty, and 'git clean' blows
it away - so I'd like to integrate something like it. Now the above
works for me on OSX, but for flexibility to deal with other platforms,
the "open" command could be replaced with an environment variable, and
do nothing if environment variable does not exist.
What do you think?
cheers -ben
PRMarkdownWriter >>visitAnnotatedParagraph: says "Pier seems to lack
consistency here ...".
Indeed, for #visitAnnotatedParagraph: we currently have:
* PRPillarWriter outputs all annotations unchanged
* PRMarkdownWriter
* prepends the the annotationLabel to the annotationText
* has special handling for @@todo by calling #visitCommentedLine:
* indicates it does some kind of nesting in a custom way; but I
can't work out the semantics; and it interrupts nested list numbering
similar to what I reported for comments.
* PRVisitor
* throws away the annotationLabel by just calling #visitParagraph
* knows nothing about @@todo
* knows nothing about nesting
* PRHTMLWriter has no definition inheriting from PRVisitor
* PRLaTeXWriter has no definition inheriting from PRVisitor
* PRTextWriter has no definition inheriting from PRVisitor
To bring some consistency I propose to...
1. Prepend annotationLabel for all the xxWriters
2. Change PRMarkdownWriter to use the code I implemented for nested
comments. Have all xxWriters use this also.
3. Drop the @@todo from PRMarkdownWriter, since if you want ToDos to be
hidden like a comment, you should just use a comment, e.g." %todo ..."
. However this change would alter the semantics of existing users of
Pier. So what is the process for such changes? Announce here and wait
some period? For consideration, there are currently no tests for
annotated paragraphs, so this could be considered outside the existing
API ;) - and so I'll add tests, which will be simpler without @@todo.
cheers -ben
> Hi Ben,
>
> On Thu, May 22, 2014 at 6:09 PM, Ben Coman<btc(a)openinworld.com> wrote:
> > Now is there any important function missing, or is there a better way to do
> > this?
>
> thank you for your contribution.
>
> I would try to generate this instead:
>
> \begin{note}
> foo bar baz
> \end{note}
>
> This environment is meant for this. To output the \begin and \end parts, use
>
> canvas environment
>
> (look at the senders of #environment in the PRLaTeXWriter class for examples)
>
> To output the text, you can just write
>
> super visitAnnotatedParagraph: aParagraph
>
>
> > I also want add an annotation type, which I'll describe in a following post.
>
>
> I should we should think a bit how these should be handled. In the
> meantime, you can just hack around :-). And please add unit tests.
>
> --
> Damien Cassou
So I determined that the following works well...
PRLaTeXWriter>>visitAnnotatedParagraph: anAnnotatedParagraph
"Pier seams to lack consistency here ..."
'todo' = anAnnotatedParagraph annotation asLowercase
ifTrue: [ ^ self visitCommentedLine: anAnnotatedParagraph ].
canvas environment
name: 'note' ;
with: [ super visitAnnotatedParagraph: anAnnotatedParagraph ].
to process Pillar markup...
@@note Pay attention to the class definition for your new
""==BlankCellTest=="". It must be a subclass of the class
""==TestCase=="". This is easy to overlook. If you did it wrong already,
no problem, just go back and correct it now and then save the code again.
Within a class, methods are organised into "protocols" that are shown in
the third browser pane from the left of Figure
*testCellStateShouldBeOffEmpty*. We will group our "tests" inside a
protocol of the same name.
to produce this nice looking PDF showing the note indented with dividing
lines...
Now that was real easy to do!! Thanks for making Pillar accessible. I
can't imagine making a similar change as easy in a Markdown processor in
some other language.
---------------
Next, in common.tex [1] I found...
{
\newcommand{\dothisicon}{\raisebox{-.5ex}{\includegraphics[height=1.2em]{pharo}}}
\newcommand{\dothis}[1]{%
\medskip
\noindent\dothisicon
\ifx#1\empty\else\quad\emph{#1}\fi
\par\smallskip\nopagebreak}
}
and discovered I could do this in the Pillar markup...
Before defining a class we should define a package to contain our
classes. When we save a package all the classes will be saved together.
It is a good practice to group together classes that work together.
{{{latex:
\dothis{Right-click on the background and open a System Browser.}
\dothis{In the package list of the System Browser, choose "add package"
to add a new package. Use the name "LaserG
}}}
to produce in the PDF two Pharo icons on separate lines...
But that is awkward and verbose to do each time, and I though it would
be nice for Pillar to handle this as an annotation like this...
Before defining a class we should define a package to contain our
classes. When we save a package all the classes will be saved together.
It is a good practice to group together classes that work together.
@@dothis Right-click on the background and open a System Browser.
@@dothis In the package list of the System Browser, choose "add package"
to add a new package. Use the name "LaserGame-Model".
so I found I could do that by added the following hack to
PRLaTeXWriter>>visitAnnotatedParagraph: ...
'dothis' = anAnnotatedParagraph annotation asLowercase
ifTrue:
[ ^ self writeRawDuring:
[ stream newLine.
stream << '\dothis{' .
stream << anAnnotatedParagraph text trimBoth .
stream << '} ' .
].
].
However changing this to be less of a hack like this...
'dothis' = anAnnotatedParagraph annotation asLowercase
ifTrue:
[ ^ canvas command
name: 'dothis' ;
parameter: [ super visitAnnotatedParagraph:
anAnnotatedParagraph ]
].
doesn't quite work, since the first Pharo icon runs onto the previous
line...
That can be fixed as follows....
PRLaTeXCommand>>name: aString
stream newLine. "<---THIS LINE ADDED"
stream
<< $\
<< aString
but I don't know if that is the right thing to do. Maybe there are
times when you want commands to run on from a line. What would be the
right thing?
Also, is it reasonable to add this new annotation type? i.e. might it
be integrated soon ? :) :) . This would really help with the Laser Game
tutorial.
[1]
https://github.com/bencoman/PharoLaserGameTutorial/blob/master/common.tex
cheers -ben
P.S. This is my first post to the mail list using PostBox on OSX. Let
me know if you notice any issues with it being not plain text and if you
have any advice ensure plain text posts in PostBox.
Hi all,
I regularly run into the trouble that using a chain accessor gives the error message:
MessageNotUnderstood: receiver of “…” is nil.
I now spot it faster what I have done wrong here: I use a chain accessor on a un initialised value.
I have 3 typical scenario’s where I use a chain accessor:
1. I have a variable that is a collection of some values, that I initialise always, and I want to access its properties.
2. I want to display some extra info, or maybe even allow editing some details of a required “base” value.
3. I want to display some extra info on a “base” value that might be initialised.
I propose that on reading, it returns a nil value, when the previous value is nil already. The write method I want to leave as is. Going back to my scenario’s:
1. In this case I guess returning an error would be proper, but on the other hand: I will get this hard error too when I try to write to this variable. So I will still find out I did something wrong (forgot initialisation) when I test properly.
2. In this case, the first time reading generates an error, as the user has not made a choice yet. Returning nil there would be the appropriate behaviour.
3. In this case, returning nil would be the appropriate behaviour, as it only displays information.
My question to you all would be:
Do you agree that the default behaviour should be to return nil, instead of generate an error? As this would be easier in use?
Alternatives:
> Modify the description, adding a property that indicates if an error in reading should be blocking or should be interpreted as “nil”.
> Create an accessor for each occurrences I have, thus avoiding using a chain accessor (i.e. by using a builder that replaces these accessors).
Cheers,
Diego