Skip to content

Fix/change label text throughout codebase#66

Merged
WhyPenguins merged 3 commits intothoth-tech:t2-2024from
Liquidscroll:fix/change-label-text-throughout-codebase
Sep 30, 2024
Merged

Fix/change label text throughout codebase#66
WhyPenguins merged 3 commits intothoth-tech:t2-2024from
Liquidscroll:fix/change-label-text-throughout-codebase

Conversation

@Liquidscroll
Copy link

@Liquidscroll Liquidscroll commented Aug 26, 2024

Description

Renamed label() functions to label_element(), all other instances of label relates to the label text, so these have been changed to label_text.

Here is an image of the UI test running correctly after these modifications:

interface_test_success

Context

We need to update SplashKit to resolve a conflict with the label parameter name. In Pascal, 'label' is a reserved keyword, which is causing issues with the current implementation.

I wrote a script to replace all instances of 'label' that were not in a comment to 'label_text'. Then the @param field in the comments for each public function (in interface.h) was modified for each applicable function to match 'label_text'. I then manually modified the label() function to label_element() . Then I reran the translator, and installed skm directly from the /out/ folder. There are some issues, however.

At this point I can compile a Pascal program with no problems, but I can't get it to run. It seems to compile despite the Notes and Warnings, so I suspect the issue is with my setup.

EDIT: I have found a fix for this, I will include this in another PR.

Compilation:

pascal_compile

Running the program:

pascal_run
Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Compiled a test Hello World program, however this cannot be run do to a linking issue. The fix for this is in progress.

Testing Checklist

  • Tested with sktest
  • Tested with skunit_tests

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have requested a review from ... on the Pull Request

@Liquidscroll Liquidscroll marked this pull request as ready for review August 28, 2024 02:59
Copy link

@Wills2022 Wills2022 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, I can't think of much to improve given the requirements of the task and the necessary changes to implement said requirements.

Good job.

Copy link

@hugglesfox hugglesfox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@WhyPenguins WhyPenguins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just noting that we'll need to update the guides on splashkit.io as well, if someone could add a card for that that'd be awesome 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants