xsharp.eu • WebServer dont work with 2.12 - Page 2
Page 2 of 3

WebServer dont work with 2.12

Posted: Mon Jul 04, 2022 8:48 am
by Horst
Hallo Wolfgang

the compiler is comlaining because the assign of the byte is in the if-endif

Code: Select all

LOCAL bBuffer 			AS BYTE[]
if 
    bBuffer := System.Text.Encoding.UTF8:GetBytes( cString ) 
endif
ocontext:Response:ContentLength64 	:= bBuffer:Length

what i mean with i dont know how to assign a byte is like:

Code: Select all

Local cString := "" as string
so i tried this and it seems ok (found in the link you send me ).

Code: Select all

Local bBuffer := Byte[]{0} as byte []
Horst

WebServer dont work with 2.12

Posted: Mon Jul 04, 2022 9:38 am
by wriedmann
Hi Horst,
the compiler is completely right here because exactly this code also gives an error at runtime.
Wolfgang

WebServer dont work with 2.12

Posted: Mon Jul 04, 2022 6:55 pm
by ic2
Hello Wolfgang,
wriedmann wrote:,
personally I think that everyone that uses X# should also have XIDE installed - even if not used in production it is the best environment for test code, for a small library or a console executable.
And it also gives the possibility to transfer code using export files like VO.
Of course I have Xide installed and I wish I could use it for everything, which I can't so I am condemned to use VS. But that also means that everything which does not work like VO or VS could be crystal clear for Xide users but not for others.

I have no idea how to handle a viaef file. In VO I would select a repo and then File/Import. This command isn't present in Xide, File/Open does not select viaef files and doubleclicking on it does not run it. And it's not documented when I search in the help on viaef.

I directly admit that Xide is a genius piece of work. But without experience how to use it, I am afraid I am not the only one who gets stuck.....

DIck

WebServer dont work with 2.12

Posted: Mon Jul 04, 2022 7:26 pm
by FFF
Godness, Dick,
aef is short for application export file. So, open any project in Xide, rightclick on its name in the treeview, hit IMPORT Application, and select the aef.

WebServer dont work with 2.12

Posted: Mon Jul 04, 2022 8:04 pm
by Chris
...or use Application->Import Application

.

WebServer dont work with 2.12

Posted: Mon Jul 04, 2022 8:25 pm
by ic2
Hello Karl,
FFF wrote:Godness, Dick,
That's too much honour. You may just call me Dick :P
FFF wrote: aef is short for application export file.
I know that, for over 20 years now.
FFF wrote:So, open any project in Xide, rightclick on its name in the treeview, hit IMPORT Application, and select the aef.
Thanks for explaining.

Compared to VO: VO always opens with a project, even a newly VO would open with a Default project with the standard libraries. Then the Import option can be found in the File menu.

In Xide I have the Empty Placeholder which doesn't work for importing viaef files. I also have another project which seems normally present in the indicated directory but first, after opening, nothing is there, see picture:
XideEmptyProject.jpg
XideEmptyProject.jpg (6.19 KiB) Viewed 469 times
On the main screen I can't remove it because nothing happens when I click the Remove button.

Chris' suggestion to use Application->Import Application sounds a lot more logical and easier.

No doubt, knowing Chris, Xide works more logical than VS (what isn't) or VO. But I maintain that when you are used to VS or VO it's less straightforward to use Xide than you seem to think.

DIck

WebServer dont work with 2.12

Posted: Mon Jul 04, 2022 8:29 pm
by Chris
Hi Dick,

For this "orphan" project in the list, please open the XIDE.cpc file in the main XIDE folder with a text editor and remove that bogus entry.

.

WebServer dont work with 2.12

Posted: Tue Jul 05, 2022 9:46 am
by ic2
Hello Chris,

Thanks, that works. I am not sure why & how it was added to Xide, there's no .sln file there either. It was a project to test setting the WebView2 to a customcontrol so nothing important.

I should spend some time on Xide I think B)

Dick

WebServer dont work with 2.12

Posted: Tue Jul 05, 2022 9:52 am
by wriedmann
Hi Dick,

Code: Select all

I should spend some time on Xide I think
that is always a good idea, specially for testing purposes. For these, I'm starting normally from the Basic X# application.
Wolfgang

WebServer dont work with 2.12

Posted: Tue Jul 05, 2022 3:19 pm
by Chris
Hi Dick,

There's no .sln, because XIDE uses a completely custom project file format, it cannot read .sln files which are used by VS, and of course VS cannot read the project files of XIDE. For this reason I had told you it is not easy to share projects/code from both VS and XIDE at the same time. Doable, but since you're already used to VS now, I think it's best to stay with it. But yeah, does not hurt to be a little familiar with XIDE, too..

.