|
Post by bitvast on Jun 20, 2014 10:07:45 GMT 1
When writing an equals sign (=) with MARK text, the "=" is followed by "(long)".
The text in the window is "x =(long) bla"
|
|
|
Post by alexfish on Jun 20, 2014 13:18:31 GMT 1
Hi bitvast
Hug MARK markup = TRUE at default
not sure if there a problem with hug , may be Peter can check the parser.
but one of the problems with markup its the things like < > and = have a different meaning
one can look up a glyph table for replacement GLYPHS not an easy task ,
Can try this for now
INCLUDE "hug.bac" INIT
Mainwin = WINDOW("MARK error", 250, 100 ) label = MARK("", 80, 30) TEXT(label,"x = bla") ATTACH(Mainwin, label, 50, 20 )
DISPLAY
HTH Alex
Edit :: just done a test with entry and it shows the same ??
INCLUDE "hug.bac" INIT
Mainwin = WINDOW("MARK error", 250, 100 ) ent = ENTRY("x=bla=pop=bang", 200, 30)
ATTACH(Mainwin, ent, 50, 20 )
DISPLAY
|
|
|
Post by bigbass on Jun 20, 2014 15:16:50 GMT 1
Hey guys Peter will have to look at that and make the fix though Just tested in gtk to see how things should be label in gtk (just a reference we wont use the C code developer.gnome.org/gnome-devel-demos/unstable/label.c.html.enporting that and adding the MARK would look this * just testing the correct syntax label = gtk_label_new (NULL); gtk_label_set_markup (label, "<small>x = bla</small>")
'--- Needed for gtk2 PRAGMA LDFLAGS gtk-x11-2.0
'--- Needed to connect signals PRAGMA LDFLAGS gobject-2.0 PROTO gtk_init PROTO gtk_window_new PROTO gtk_window_set_title PROTO gtk_window_set_default_size PROTO gtk_label_new PROTO gtk_label_set_justify PROTO gtk_label_set_line_wrap PROTO gtk_container_add PROTO gtk_widget_show_all PROTO gtk_main
PROTO gtk_label_set_markup
ENUM GTK_JUSTIFY_LEFT, GTK_JUSTIFY_RIGHT, GTK_JUSTIFY_CENTER, GTK_JUSTIFY_FILL, END ENUM
'--- set undeclared values GTK_WINDOW_TOPLEVEL = 0 GTK_ORIENTATION_VERTICAL = 1
gtk_init(0, 0)
'--- Create a window with a title and a default size window = gtk_window_new(GTK_WINDOW_TOPLEVEL)
gtk_window_set_title (window, "Welcome to BaCon") gtk_window_set_default_size (window, 200,100) '--- Create a label and set its alignment. Setting the line wrap to TRUE makes '--- the label break lines if the text exceeds the widget's size. When set to '--- FALSE the text gets cut off by the edge of the widget label = gtk_label_new ("Hello BaCon!"); gtk_label_set_justify (label, GTK_JUSTIFY_CENTER) gtk_label_set_line_wrap (label, TRUE) label = gtk_label_new (NULL); gtk_label_set_markup (label, "<small>x = bla</small>")
gtk_container_add (window, label) gtk_widget_show_all (window) gtk_main
|
|
|
Post by alexfish on Jun 20, 2014 15:47:47 GMT 1
Hi Joe
tested similar with hug , now this works one my sys
INCLUDE "hug.bac" INIT
Mainwin = WINDOW("MARK error", 250, 100 ) label = MARK("<small>x = bla</small>", 80, 30) 'TEXT(label,"<small>x = bla</small>") ATTACH(Mainwin, label, 50, 20 )
DISPLAY
BR Alex
|
|
|
Post by bigbass on Jun 20, 2014 16:46:59 GMT 1
Try this INCLUDE "hug.bac" INIT
Mainwin = WINDOW("MARK error", 250, 100 ) label = MARK("", 80, 30) gtk_label_set_markup (label, "x = bla") ATTACH(Mainwin, label, 50, 20 )
DISPLAY
|
|
|
Post by bitvast on Jun 20, 2014 18:12:15 GMT 1
Hey guys, thanks for the input. What's great about BaCon is that there always seems to be a workaround for any problem. Interested to see what Peter has to say about this though.
|
|
|
Post by alexfish on Jun 20, 2014 18:51:38 GMT 1
Hi bitvast
in the meantime how about a bit of Shorthand
"======TIME ago there was BASIC"
BR Alex
|
|
|
Post by Pjot on Jun 20, 2014 20:24:09 GMT 1
Well, unfortunately it's a bug but the good news is that the fix can be obtained from the beta directory. Thanks for reporting! Peter
|
|
|
Post by bitvast on Jun 21, 2014 8:26:09 GMT 1
Thanks Peter. I seem to have a knack for finding bugs, do I get a prize?
|
|
|
Post by vovchik on Jun 21, 2014 11:33:33 GMT 1
Dear bitvast, Good work! And keep it up. You are only making BaCon better. And you do seem to have a special knack for this kind of thing. With kind regards, vovchik
|
|