Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 22 2018 12:49
    per-samuelsson labeled #4643
  • May 22 2018 12:48
    per-samuelsson labeled #4643
  • May 22 2018 12:48
    per-samuelsson opened #4643
  • May 22 2018 12:43
    miyconst commented #4642
  • May 22 2018 12:42
    miyconst assigned #4642
  • May 22 2018 12:39
    per-samuelsson commented #4642
  • May 22 2018 12:34
    miyconst labeled #4642
  • May 22 2018 12:34
    miyconst commented #4642
  • May 22 2018 12:33
    miyconst labeled #4642
  • May 22 2018 12:21
    bigwad commented #4638
  • May 22 2018 12:21
    per-samuelsson edited #4642
  • May 22 2018 12:21
    per-samuelsson commented #4642
  • May 22 2018 12:21
    per-samuelsson labeled #4642
  • May 22 2018 12:21
    per-samuelsson labeled #4642
  • May 22 2018 12:20
    per-samuelsson opened #4642
  • May 22 2018 12:02
    per-samuelsson commented #4638
  • May 22 2018 10:45
    k-rus commented #4641
  • May 22 2018 10:19

    bigwad on 121

    (compare)

  • May 22 2018 10:19

    bigwad on develop

    Add blocking debugger notificat… (compare)

  • May 22 2018 10:03

    bigwad on 121

    Add blocking debugger notificat… (compare)

Per Samuelsson
@per-samuelsson
well, accessing tables are always done in the scope of a certain database
starcounter supply you with a model where your code is hosted, and the host is the database itself (simply put). you access tables by accessing the database classes of your application
to add a table to a specified database, you must run your application in that database, and by doing so, starcounter will create the table for you (from your specified class definition)
Per Samuelsson
@per-samuelsson

bottom-line: adding (i.e. creating) tables in the current version can only be done by means of defining a C# database class, like so:

[Database] public class MyClass {
  public int MyField;
}

This is semantically similar to DDL "CREATE TABLE MyClass( MyField int);" from some other database confirming to SQL-92

pal88
@pal88
hi,
why in the code inside Handle.GET not executing...:(
Marcin Warpechowski
@warpech
is a breakpoint reached when put it in the first line of Handle.GET? if not - is the program started? do you call the GET request using the correct URL?
pal88
@pal88

using System;
using Starcounter;

namespace example2
{
class Program
{
static void Main()
{
Handle.GET("/example2", () =>
{
return "<!DOCTYPE html><link rel='stylesheet' href='/quote.css'/><title>Hello</title>" +
"<div id='Says'>Make things as simple as possible, but not simpler.</div>" +
"<div id='Person'>Albert Einstein</div>";
// return "hello";
});
PolyjuiceNamespace.Polyjuice.Map("/example2", "/");
}
}
}

the program runs... but there is no output..
pal88
@pal88

using System;
using Starcounter;
using PolyjuiceNamespace;

namespace test2
{
class Hello
{
static void Main()
{
Handle.GET("/test2", () =>
{ return "hello!!"; }
);
Console.WriteLine("HI!!");

    }
}
}
}
}
here too only HI is seen as output...:(
Per Samuelsson
@per-samuelsson
how do u invoke the handlers?
when you write out "hi" you should see it in the console window belonging to your application
but wheen you return "hello" from your handler, you should see it from the context u invoke the handler from,
which is normally your browser
that is: the output of what you return from your delegate is NOT shown when you start your app, you must
retreive it via a call to the handler, e.g. doing localhost:8080/test2 if you are running under default settings
does this make sense to you?
pal88
@pal88
i usually go the 'start executable' where there is a list of running files and required file is selected to see the results....Is there another way??
Per Samuelsson
@per-samuelsson
yeah, you can either start it from within Visual Studio (assuming you installed the extension), or you can start applications with a command-line tool
star.exe [yourapp.exe]
but you can stick to start executable, thats fine
in what way to you mean "hello!" doesn't show up?
pal88
@pal88
Thank you so much @per-samuelsson i did open it using localhost:8080/test2 it worked fine....
Per Samuelsson
@per-samuelsson
ok, great :fire:
just let us know if u need some further help
pal88
@pal88
i cannot use personal server .... as im not able to edit anything in the starcounter server
what is the extension you are talking about?? dont remember to have installed it...
Per Samuelsson
@per-samuelsson
the "extension" is what allows you to build starcounter applications in visual studio, it is enabled/installed by
default, so you probably just have it. i guess you are creating your applications by using New Project | "Starcounter Application" in
Visual Studio?
pal88
@pal88
yes...
Per Samuelsson
@per-samuelsson
ok cool, so then you have the extension
pal88
@pal88
but still what/which extension are we talking about...
Per Samuelsson
@per-samuelsson
its installed, it came as part of the installer, it runs inside visual studio, and allows u to start your application from there
whats the story with the personal server? what do u mean u cant use it?
pal88
@pal88
i cannot edit in the server...:(
it just starts...
blob
its pinned on the taskbar else its lost...
Per Samuelsson
@per-samuelsson
well, "editing the server" is not something you normally do, but of course it can be done
what exactly is it tha you want to edit?
pal88
@pal88
by edit i mean type or run files on server
Per Samuelsson
@per-samuelsson
what files?
do you mean to have static files, like .html-files, and be able to access them?
pal88
@pal88
no no..... run application /projects/files in command line tool....
Per Samuelsson
@per-samuelsson
well, sorry i dont think i understand exactly what it is you want to do :worried:
the server console you see is a machine-wide "service" that you can consider some kind of controller of all apps and databases on your machine
you never access that server directly, if thats what you mean
starcounter is about writing applications that expose themselves to the outside via REST interfaces (normally), i.e. the Handle.GET for example
pal88
@pal88
ok... so i tried running example files in command line/command prompt... it said file not found for all files... so i thought may be we can access it in the starcounter server command prompt...... sorry for confusing...