Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » TURTLE alpha status
TURTLE alpha status [message #41887] Mon, 03 February 2014 20:25 Go to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Turtle is a thin HTML5/Javascript client / U++ rainbow backend.

Today I have moved Turtle to 'canonical' uppsrc and made TURTLE flag work.

There is also a new reference example, "WebWord", which could serve as recipe how you to convert regular U++ application into HTML5 based one.

There is a lot of work remaining, but I think it is quite usable already.

Enjoy,

Mirek
Re: TURTLE alpha status [message #41888 is a reply to message #41887] Mon, 03 February 2014 23:10 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Hi Mirek,

You're turtle package is great : I added a GraphCtrl to WebWord just for a simple test and it worked out of the box with svn.6827 Cool

But when I try to make my own Turtle application (today with lattest svn) : everything compiles well ... but when I launch it, it's WebWord who gets launched ???.
I only managed to launch my app once and I even got a TheIde launched ( without ever making a turtle theide !!! ).

Something seems to be unstable or memorized in the build or launch process but I have no idea what Confused
I also noticed that since todays svn release mouse management seems to have changed : with svn.6827 GraphCtrl worked fine, now, my Firefox promps me for stopping the script (which does not end when mouse comes over GraphCtrl )


I will try to recompile TheIde and do some more testing

NB: I am testing on Fedora 19


Here are the modifications I made to WebWord to do my test

struct UWord : public TopWindow {
public:
	virtual void DragAndDrop(Point, PasteClip& d);
	virtual void FrameDragAndDrop(Point, PasteClip& d);
	
	virtual void ShutdownWindow();

	RichEdit   editor;
	MenuBar    menubar;
	ToolBar    toolbar;
	StatusBar  statusbar;
	String     filename;
	XYY2LT_GraphCtrl  graph;      // ***************Line added *****************
	
	int64      sent_prev;

	static LRUList& lrufile() { static LRUList l; return l; }

	void Load(const String& filename);
	void OpenFile(const String& fn);
	void New();
	void Open();
	void Save0();
	void Save();
	void SaveAs();
	void Print();
	void Pdf();
	void About();
	void Destroy(bool shutdown);
	void SetBar();
	void FileBar(Bar& bar);
	void AboutMenu(Bar& bar);
	void MainMenu(Bar& bar);
	void MainBar(Bar& bar);
	
	void ShowInfo();

public:
	typedef UWord CLASSNAME;

	static void SerializeApp(Stream& s);

	UWord();
};



UWord::UWord()
{
	AddFrame(menubar);
	AddFrame(TopSeparatorFrame());
	AddFrame(toolbar);
	AddFrame(statusbar);
	//Add(editor.SizePos());  // *********** line modified
	Add(graph.SizePos());     // *********** line added
	menubar.Set(THISBACK(MainMenu));
	Sizeable().Zoomable();
	WhenClose = THISBACK1(Destroy, false);
	menubar.WhenHelp = toolbar.WhenHelp = statusbar;
	static int doc;
	Title(Format("Document%d", ++doc));
	Icon(CtrlImg::File());
	editor.ClearModify();
	SetBar();
	editor.WhenRefreshBar = THISBACK(SetBar);
	OpenMain();
	ActiveFocus(graph);

	SetTimeCallback(-1000, THISBACK(ShowInfo));
	sent_prev = 0;
}

[Updated on: Mon, 03 February 2014 23:20]

Report message to a moderator

Re: TURTLE alpha status [message #41891 is a reply to message #41888] Tue, 04 February 2014 07:48 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Thanks for reporting, obviously things will take some time to mature...

Didier wrote on Mon, 03 February 2014 17:10


with svn.6827 GraphCtrl worked fine, now, my Firefox promps me for stopping the script (which does not end when mouse comes over GraphCtrl )


This one already spotted and fixed... (in today's svn)

Mirek
Re: TURTLE alpha status [message #41894 is a reply to message #41891] Tue, 04 February 2014 09:47 Go to previous messageGo to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Hi Mirek,

I tried to compile the Reference/WebWord on Windows MSC9. Here are the issues and the solutions for them to make it work on Windows:

1. The following declaration is missing in WebWord.h but still referenced in ShowInfo:

int64      sent_prev;


2. The compiler goes nuts about this in Core/Gtypes.h:
#ifdef PLATFORM_WIN32
	operator const RECT*() const { ASSERT(sizeof(*this) == sizeof(RECT)); return (RECT*)this; }
	operator RECT*()             { ASSERT(sizeof(*this) == sizeof(RECT)); return (RECT*)this; }
	operator RECT&()             { ASSERT(sizeof(*this) == sizeof(RECT)); return *(RECT*)this; }
	operator RECT() const        { RECT r; r.top = top; r.bottom = bottom;
									       r.left = left; r.right = right; return r; }
	Rect_(const RECT& rc)        { Set((T)rc.left, (T)rc.top, (T)rc.right, (T)rc.bottom); }
#endif


Commenting it out removes the problem, but is hardly the solution to use. (Should it be conditioned with "&& !PLATFORM_TURTLE" ?)

3. Finally when linking I get:

Linking...
FT_fontsys.lib(FT_fontsys.obj) : error LNK2005: "void __cdecl Upp::GetStdFontSys(class Upp::String &,int &)" (?GetStdFontSys@Upp@@YAXAAVString@1@AAH@Z) already defined in Draw.lib(FontWin32.obj)
FT_fontsys.lib(FT_fontsys.obj) : error LNK2005: "class Upp::String __cdecl Upp::GetFontDataSys(class Upp::Font)" (?GetFontDataSys@Upp@@YA?AVString@1@VFont@1@@Z) already defined in Draw.lib(FontWin32.obj)
FT_fontsys.lib(FT_fontsys.obj) : error LNK2005: "class Upp::Vector<struct Upp::FaceInfo> __cdecl Upp::GetAllFacesSys(void)" (?GetAllFacesSys@Upp@@YA?AV?$Vector@UFaceInfo@Upp@@@1@XZ) already defined in Draw.lib(FontWin32.obj)
FT_fontsys.lib(FT_fontsys.obj) : error LNK2005: "struct Upp::CommonFontInfo __cdecl Upp::GetFontInfoSys(class Upp::Font)" (?GetFontInfoSys@Upp@@YA?AUCommonFontInfo@1@VFont@1@@Z) already defined in Draw.lib(FontWin32.obj)
FT_fontsys.lib(FT_fontsys.obj) : error LNK2005: "struct Upp::GlyphInfo __cdecl Upp::GetGlyphInfoSys(class Upp::Font,int)" (?GetGlyphInfoSys@Upp@@YA?AUGlyphInfo@1@VFont@1@H@Z) already defined in Draw.lib(FontWin32.obj)
FT_fontsys.lib(FT_fontsys.obj) : error LNK2005: "void __cdecl Upp::RenderCharacterSys(struct Upp::FontGlyphConsumer &,double,double,int,class Upp::Font)" (?RenderCharacterSys@Upp@@YAXAAUFontGlyphConsumer@1@NNHVFont@1@@Z) already defined 
	in Draw.lib(FontWin32.obj)
C:\upp-svn\out\reference\MSC9.Turtle\WebWord.exe : fatal error LNK1169: one or more multiply defined symbols found


To fix this, the package dependency in WebWord to plugin/DroidFonts needs to be conditionalized with When: TURTLE && !WIN32.

The last one can be solved by moving:
extern StaticRect& DesktopRect();


outside of the bool Ctrl::StartSession() function in Turtle/Server.cpp.

--

The WebWord then compiles, links and runs just fine on Windows (for one client session:).

Best regards,

Tom
Re: TURTLE alpha status [message #41895 is a reply to message #41894] Tue, 04 February 2014 11:33 Go to previous messageGo to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Hi,

Yes, it seems we need:

#if defined(PLATFORM_WIN32)
	#ifndef flagTURTLE
		operator const RECT*() const { ASSERT(sizeof(*this) == sizeof(RECT)); return (RECT*)this; }
		operator RECT*()             { ASSERT(sizeof(*this) == sizeof(RECT)); return (RECT*)this; }
		operator RECT&()             { ASSERT(sizeof(*this) == sizeof(RECT)); return *(RECT*)this; }
		operator RECT() const        { RECT r; r.top = top; r.bottom = bottom;
										       r.left = left; r.right = right; return r; }
		Rect_(const RECT& rc)        { Set((T)rc.left, (T)rc.top, (T)rc.right, (T)rc.bottom); }
	#endif
#endif


or something similar in Core/Gtypes.h.

Best regards,

Tom
Re: TURTLE alpha status [message #41934 is a reply to message #41895] Fri, 07 February 2014 16:12 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Hi Mirek,

Turtle works fine now (at least with GraphCtrl) but there are duplicate packages : one in Rainbow and the other one in uppsrc.

I think you forgot to remove in svn the old source when moving it to uppsrc.

In current status, WebWord does not compile ( because rainbow/Turtle is outdated )
Re: TURTLE alpha status [message #41994 is a reply to message #41895] Mon, 10 February 2014 09:25 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Tom1 wrote on Tue, 04 February 2014 05:33

Hi,

Yes, it seems we need:

#if defined(PLATFORM_WIN32)
	#ifndef flagTURTLE
		operator const RECT*() const { ASSERT(sizeof(*this) == sizeof(RECT)); return (RECT*)this; }
		operator RECT*()             { ASSERT(sizeof(*this) == sizeof(RECT)); return (RECT*)this; }
		operator RECT&()             { ASSERT(sizeof(*this) == sizeof(RECT)); return *(RECT*)this; }
		operator RECT() const        { RECT r; r.top = top; r.bottom = bottom;
										       r.left = left; r.right = right; return r; }
		Rect_(const RECT& rc)        { Set((T)rc.left, (T)rc.top, (T)rc.right, (T)rc.bottom); }
	#endif
#endif


or something similar in Core/Gtypes.h.

Best regards,

Tom


That is weird. I believe I have now WebWord working in Win32 (in debug mode, fork issue is still unresolved), but about the only thing I had to fix was DesktopRect issue...

Mirek
Re: TURTLE alpha status [message #42002 is a reply to message #41994] Mon, 10 February 2014 14:28 Go to previous messageGo to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Hi,

This one last problem persists in Core/GTypes.h when compiling with MSC9. However, when I tried with MSC10, everything worked just fine.

I think MSC9 should be kept alive due to the following reasons:

- Recent Microsoft update broke the Windows7 SDK (7.1) and the bundled MSC10, and they have no intention to fix it anymore. (Just need to roll back any relevant updates and re-install SDK and stuff.)

- Max's Protect package only works with MSC9

- MSC9 is the last one to target Windows 2000, if this has any significance to anybody.

Best regards,

Tom
Re: TURTLE alpha status [message #42015 is a reply to message #42002] Tue, 11 February 2014 08:07 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
OK, so MSC9 is it. Now should be fixed.

Now the central problems remaining to fully useful Turtle are

- some ability to upload data to server (I am afraid somehow the regular "upload dialog" will have to be employed for this particular task).

- clipboard handling. This one is really tough, HTML5 does not really has obvious support for this...
Re: TURTLE alpha status [message #42020 is a reply to message #42015] Tue, 11 February 2014 10:11 Go to previous messageGo to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Mirek,

The previous font issue on WIN32 popped up again: The package dependency in WebWord to plugin/DroidFonts needs to be conditionalized with 'When: TURTLE && !WIN32' in order to link it successfully. This goes for both MSC9 and MSC10.

(I'm not quite sure why this disappeared and reappeared again..)

Best regards,

Tom
Re: TURTLE alpha status [message #42021 is a reply to message #42020] Tue, 11 February 2014 11:02 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Tom1 wrote on Tue, 11 February 2014 04:11

Mirek,

The previous font issue on WIN32 popped up again: The package dependency in WebWord to plugin/DroidFonts needs to be conditionalized with 'When: TURTLE && !WIN32' in order to link it successfully. This goes for both MSC9 and MSC10.

(I'm not quite sure why this disappeared and reappeared again..)

Best regards,

Tom


There are some glitches in build system for convoluted cases as TURTLE is, you might want to try rebuild all.

DroidFonts is host platform totally independent source of glyph graphics. It replaces any host platform technology; it happens through

#include "Draw.h"

NAMESPACE_UPP

#ifndef CUSTOM_FONTSYS


in Draw/FontWin32.cpp (and Draw/FontFc.cpp).

[Updated on: Tue, 11 February 2014 11:02]

Report message to a moderator

Re: TURTLE alpha status [message #42022 is a reply to message #42021] Tue, 11 February 2014 11:51 Go to previous message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
OK, now I got it: I have used TheIDE 5485, while having the source from SVN. Something in the build system has changed since then. With the current TheIDE everything works just as one might expect.

Thanks,

Tom
Previous Topic: MT/GuiLock rules changed
Next Topic: plugin/LZMA
Goto Forum:
  


Current Time: Thu Mar 28 15:41:48 CET 2024

Total time taken to generate the page: 0.01637 seconds