Jump to content

Czar

Members
  • Content Count

    445
  • Joined

  • Last visited

  • Days Won

    13

Posts posted by Czar

  1. The moment I go into the forum. It pops up. Navigating through the forum it continues to pop up.

     

    Using firefox. It even does it if I signout of the forum

    no pop-ups if I log in using chrome.

    virteq.jpg

  2. The balls are TW3IMages sandwiched between a background and a foreground image. The foreground image is a PNG with the hole 

            var FeedbackInst:= tw3image.create(self);
            FeedbackInst.zindex:=2;
            FeedbackInst.setbounds(-19,25,30,30);
            FeedbackInst.OnLoad:=procedure (sender:TObject)
              Begin
                w3_setstyle(FeedbackInst.Handle,'-webkit-transition','opacity 0.5s ease-in'); //webkit
                w3_setstyle(FeedbackInst.Handle,'transition','opacity 0.5s ease-in'); //mozilla
                FeedbackInst.AlphaBlend:=True;
              end;
            FeedbackInst.loadfromurl('res/ballGreen.png');
            FeedbackInst.tagvalue:= CNT_MYAPP_FeedbackBalls;
            FeedbackInst.fxMoveBy(30,0, 0.5);
    

    So I basically create the image out of sight and then move them right. 

     

    The existing balls are set to move before the new ball is create

     

    procedure TForm1.ShiftFeedbackBalls;
    begin
     for var i := GetChildCount - 1 downto 0 do
         if (GetChildObject(i) is tw3image) and (GetChildObject(i).TagValue=CNT_MyApp_Feedbackballs) then
          begin
            var img := tw3image(GetChildObject(i));
            img.fxmoveby(30,0,0.5);
    
            if img.Left > 190 then img.free;
          end;
    end;
    
  3. Is it possible to add files from a different location?

     

    i.e., in delphi in dpr we do things  like

     

    uses

    frontend in 'c:\myfiles\frontend.pas'

     

    is there similar in SMS.

     

    Alternatively can we add custom library paths?

     

    ---

     

    If we were to have a team of people coding using a set of common units how could this be achieved using SMS?

     

    Seems at the moment each coder would have to have a copy of the custom files in the library folder, is that correct?

  4. It is not used when it is a web app. However, when you wrap an html5 app into cocoon or similar then it can function like a regular app. So there are cases where you need to be able shutdown the application.

     

     

    I will try

     

         asm
          window.close();
         end;

  5. I have put together my first proper SMS project. It looks pretty trivial but it does have a quite a few features that are vital to what we would like to do with SMS.

     

    We currently develop and maintain a large library of maths and English exercises for kids from 5 to 15 years. Currently 99% is written in Delphi. We would like to expand online and possibly convert a significant amount of our software.

     

    In this case we have a simple exercise that talks to an infobar. The infobar handles feedback to the student and can store and retrieve data from a database.

    NWExercise.jpg

    The infobar along the bottom is in an iframe that is separate from the exercise. The huge benefit is that we can have hundreds of exercises and only one infobar to change. The two parts talk using messaging (in beta RTL).

     

    I have made it so that the exercise scales to the window.

     

    Finally, I grouped the essential elements of the UI, in this case just the editbox and question label, onto a transparent panel. The panel is "zoomed" based on the height of the window compared to a design time norm. This means we can develop for today's monitors but if 4k and 8k monitors become the norm then the panel and its contents will expand in size.

     

    I am happy to discuss or share some code if it helps anyone with a particular issue.

     

    cheers

     

    http://numberworksnwords.com/cloud/exercise/index.html

  6. On a tablet it seems that setting focus to an editbox brings up the tablet's virtual keyboard.

     

    Is there a way to suppress that behaviour? I am expecting a numeric response from the user and I have my own "calculator pad" on the screen so the virtual keyboard is redundant.

     

    So the question how to prevent the virtual keyboard activating?

  7. I was having difficulty centring a panel on the screen when zoom>1.

     

    It took me a little while to work out what was going on so I thought I would post a solution in case other people get a bit stuck on the same issue.

     

    In this example I had two panels, one zoom=1 and zoom=2

     

    It turns out that the area that you are centring on is being zoomed.

    procedure TForm1.Resize;
    begin
      inherited;
    
      panelzoom.zoom := 2;
      panelzoom.left := trunc(self.ClientWidth / (2*panelzoom.zoom)) -  (panelzoom.width div 2);
      panelzoom.top :=  trunc(self.ClientHeight / (2*panelzoom.zoom)) -  (panelzoom.Height div 2);
    
    
    
      panelnotzoom.left := (self.ClientWidth div 2) -  (panelnotzoom.width div 2);
      panelnotzoom.top := (self.ClientHeight div 2) -  (panelnotzoom.Height div 2);
    end;
    
  8. It looks interesting but I am not sure I fully understand the purpose. Are these then components on the IDE component ribbon? Are they components that you can access in code only? Just looking at some of the SMS code is interesting in itself.

     

    Thanks for sharing

  9. On the other hand we have been working with the new RTL and the desktop. We are currently building our first application and we see a bright future for SMS. Currently it is hard going, we are puzzling our way through trying to get the various aspects working.

     

    Ideally we will be wanting to "port" 20 years of Delphi software to SMS. Most of the Delphi code are exercises for maths and language teaching. This means each little module is self contained which makes life much easier when dealing with SMS.

     

    At the present time we are not 100% sure we can do it but we learn more as we build our first applications.

     

    We intend to use the desktop as the platform that will house all our other software which will make a dynamic and exciting workspace for our students. I just wish we could fund the SMS team to work on development 100% of the time

  10. Yes, Jon has been ill all weekend.

    It makes sense to concentrate questions and answers on this forum as it the place people will find everything.

    We are using SMS for an on-boarding application for new customers - we hope to get a feel for what we can expect from SMS as a whole.

  11. We have been using a newer version of the RTL

     

    This code used to work
    REST['http://md5.jsontest.com''].Post('text=' + source, [], [], LogHttpDetails).OnDone(LogMD5);

     

    we changed it to 

     

    REST.Api['http://md5.jsontest.com''].call.Post('text=' + 'asd').OnDone(LogMD5);

     

    to seemingly work with the new RTL

     

    however, it does not appear to post correctly as the ondone procedure returns undefined error

     

    procedure TForm1.LogMD5(http: TW3HttpRequest);
    begin
      var resp := TMD5Response(JSON.Parse(http.ResponseText));
      Log("MD5('" + resp.original + "') = " + resp.md5);
    end;
     
    Comes back as an error. 
  12. I am trying to work out how we can print.

     

    Print reports, print formatted text, print PDFs etc

     

    I have searched but I can find no examples or source that seems to do this. In delphi we use fastreports quite a bit.

     

    Can someone point me in the right direction?

×
×
  • Create New...